Python Forum

Full Version: list - 2 questions:
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
format_list = lambda x: [i for i in x[1::2]]
new_list = format_list(["A", "B", "C", "D", "E", "F"])
print(new_list)
Output:
['B', 'D', 'F']
Pages: 1 2 3 4 5