3 ms·
Your solution (which does not account for leap years, btw) simplifies to: def days(month): return [31,28,31,30,31,30,30,31,30,31,30,31][month]
by btbuildem 12y ago
Your solution (which does not account for leap years, btw) simplifies to:
def days(month):
return [31,28,31,30,31,30,30,31,30,31,30,31][month]
- thaumasiotes 12y agoI can't wait for 0/0/2015 ;)
- btbuildem 12y agoHa, nice one. I'm mixing my Es with my Ps