Sep-27-2019, 09:12 PM
If you go with zip(), you'll want to slice the list up into lowercase an uppercase characters to get the desired result.
my_list = ['a', 'A', 'b', 'B', 'c', 'C'] for pair in zip(my_list[::2], my_list[1::2]): print(pair)