The example in this article describes how Python gets the day of the week that a certain day is. Share it with everyone for your reference, the details are as follows:
Here we take the Spring Festival of 2017 (January 28) as an example:
import re; import time; import datetime; if(__name__=="__main__"): #today=int(time.strftime("%w")); anyday=datetime.datetime(2017,1,28).strftime("%w"); print anyday
The running effect diagram is as follows:
For more examples of Python methods to get the day of the week for a certain day, please pay attention to the PHP Chinese website for related articles!