Computer Science, asked by angelrathore723, 4 months ago

write a Python program to display the name of the day according to the number given by the user​

Answers

Answered by divyansh721
2

Answer:

I had to look into the code to find out that calendar.day_namehas a __getitem__ method that slices a list with datetime objects representing a week (calendar.day_name._days) and returns a formated string representing the name of the day or a list if you pass in a slice. – dasdachs Nov 23 '16 at 12:57

Code sample

>>> import locale

>>> locale.setlocale(locale.LC_ALL, 'de_DE')

'de_DE'

>>> list(calendar.day_name)

['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag']

Explanation:

If possible the plz mark me as brainliest

Similar questions