0
Does this code can get more shorter
Python https://sololearn.com/compiler-playground/ccdjE08loqJG/?ref=app
6 Antworten
+ 2
import calendar
print(calendar.calendar(2024))
The problem is this only works on desktop
If you run this code on mobile it
will be a mess
+ 2
alternative one liner to Mirielle's code:
print(*(__import__("calendar").month(2024, i) for i in range(1, 13)))
+ 2
Neha Agarwal ,
Here's the short vanilla version.
from calendar import month
for m in range(1, 13):
print(month(2024, m))
+ 2
I found this code on some website,
maybe you can benefit from the code:
import calendar
cal = calendar.TextCalendar(calendar.SUNDAY)
print(cal.formatyear(2024, 2, 1, 5, 3))
+ 2
#Addition to the code of P A Arrchith Iyer
import calendar as c
print(c.calendar(2024, m=1))
#Will work on mobile