Jul-25-2021, 05:55 PM
(Jul-24-2021, 08:10 PM)Yoriz Wrote: The for loop is not necessary with your code, I just used it to show an example of getting a different day from a differentcalendar.weekday
you can modify your existing code to usecalendar.day_name
I have pretty much shown you how to do without actually altering your code myself
see this as another example
import calendar weekday = calendar.weekday(2021, 7, 24) day_name = calendar.day_name[weekday] print(day_name) print(f"Day of the week in english is {day_name}")Think of
Output:Saturday Day of the week in english is Saturdaycalendar.day_name
as being a list of each day of the week with Monday at index 0, Tuesday at index 1 etc.
Hi, thanks.
ill try it soon and update ( today a little problematic ), tommorow ill try it on my code and see if it works, ill update.
thanks again :)