python datetime.strptime 属性错误
import datetime
print datetime.strptime("00", "%y").year
我想把“00”传入datetime.strptime这个函数,然后得到“2000”作为输出。但是,当我运行代码时,总是出现这个错误:AttributeError: 'module' object has no attribute 'strptime'
import datetime
print datetime.strptime("00", "%y").year
我想把“00”传入datetime.strptime这个函数,然后得到“2000”作为输出。但是,当我运行代码时,总是出现这个错误:AttributeError: 'module' object has no attribute 'strptime'