我只是有一个简单的问题,我想以“0/0/0000”格式打印日期,但它的输出方式是“0,0,0000”格式。我怎么能改变这个?它与这部分代码有关:
print(time_now.tm_mon, time_now.tm_mday, time_now.tm_year)
谢谢!这是到目前为止的所有程序。
import calendar
from time import localtime
def timeDate():
time_now = localtime()
print(time_now.tm_mon, time_now.tm_mday, time_now.tm_year)
return None
def get_calendar():
bold = "\033[1m"
reset = "\033[0;0m"
cal = calendar.month(2013, 5)
print("")
print(bold+"Here is the calendar:"+reset)
print("")
print cal
return None