vin*_*y h 19 python python-2.7 python-3.x
请在以下建议我.如何在Python中查找特定日期是工作日还是周末?
fah*_*had 55
import datetime
weekno = datetime.datetime.today().weekday()
if weekno<5:
print "Weekday"
else:
print "Weekend"
Run Code Online (Sandbox Code Playgroud)