Can anybody help?Here's the code that gives me a hedeache for second day 
https://bpa.st/XLOA 
If I have letter_list = ["a","a",,"b","b","c","c"] it's working
correctly but if I have three or more of any letters for
example:letter_list = ["a","a","a","b","b","c","c"], I'm ending up with
some pairs somewhere.
I took another way approach today: https://bpa.st/E7HQ, was thinking
about iterating and checking if neighbour characters won't make a pair
but I've end up with error:
if x != letter_list[i+1] and letter_list[i-1]:
IndexError: list index out of range
andin addition: got 4 "a" (had 3only) and missing 1 "b" :-/

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to