Python Forum
List with "or" value?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List with "or" value?
#7
(Jul-23-2018, 09:05 AM)WolfWayfarer Wrote: Big Grin it reminded me of code-obfuscation contests.

Yeah, I am quite Monty about it Smile

Nevertheless, it is basically very simple conditional expression and list comprehension:


[[days_in_month if not Feburary else days_in_february] for monthnum in year]
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
List with "or" value? - by WolfWayfarer - Jul-20-2018, 04:13 AM
RE: List with "or" value? - by DeaD_EyE - Jul-20-2018, 06:50 AM
RE: List with "or" value? - by perfringo - Jul-20-2018, 07:23 AM
RE: List with "or" value? - by WolfWayfarer - Jul-21-2018, 01:16 AM
RE: List with "or" value? - by perfringo - Jul-23-2018, 08:13 AM
RE: List with "or" value? - by WolfWayfarer - Jul-23-2018, 09:05 AM
RE: List with "or" value? - by perfringo - Jul-23-2018, 01:17 PM

Forum Jump:

User Panel Messages

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