我如何将年、月、日与“今天”分开,并将它们保存在ex下。年=,月=,日=,?
import datetime
import time
#veriables
today = datetime.datetime.today()
print("Vpišite datum rojstva v zaporedju l-m-d")
leto = int(input("Leto: "))
mesec = int(input("Mesec: "))
dan = int(input("Dan: "))
list2 = [today]
one = list2[1]
two = list2[2]
three = list2[3]
print(list2, one, two, three)
我厌倦了这样做:How can I store each value from a list to multiple variables?
1条答案
按热度按时间kse8i1jr1#