Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list - 2 questions:
#41
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']
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Discord bot that asks questions and based on response answers or asks more questions absinthium 1 34,359 Nov-25-2017, 06:21 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020