a = ['z', 'a', 'q', 'v', 'e', 'w', 'w', 'w']b = sorted(a[i] for i in range(0, len(a), 2))print(b)
Standard input is empty
['e', 'q', 'w', 'z']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!