Get Current Week Number in Python (Example) | Find & Print | Apply isocalendar() & str() Functions
Автор: Statistics Globe
Загружено: 2023-02-08
Просмотров: 286
Описание:
How to return the current number of week in the Python programming language. More details: https://statisticsglobe.com/get-curre...
This tutorial was created in collaboration with Matthias Bäuerlen: https://statisticsglobe.com/matthias-...
Python code of this video:
import datetime # Import datetime module in Python
my_date = datetime.date.today() # Show actual date
print(my_date)
2022-06-13
year, week_num, day_of_week = my_date.isocalendar() # Using isocalendar() function
print("Week #" + str(week_num)) # Showing week number
Week #24
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – R Programming Group for Discussions & Questions: / statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – R Programming Group for Discussions & Questions: / 12555223
LinkedIn – Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: