Python Forum
do_somenthing_with(x) for x in my_list if is_valid(x)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
do_somenthing_with(x) for x in my_list if is_valid(x)
#9
I really don't understand. You're saying you don't want a list comprehension, but what you're describing is a list comprehension, and all of your examples are legal syntax for list comprehensions or generator expressions. In what way is your suggestion different from what we already have?
Reply


Messages In This Thread
RE: do_somenthing_with(x) for x in my_list if is_valid(x) - by nilamo - Sep-24-2018, 02:45 PM

Forum Jump:

User Panel Messages

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