I am importing a class that I am using in this function but that is unrelevant for you. My problem is that carSize2 is being skipped over when I append to my textfile
file = open("data", "a")
number = input("What is your license number?: ")
name = input("What is your name?: ")
carSize = input("What kind of car do you have? Please press 1 for small, 2 for medium and 3 for big: ")
carSize2 = str()
if carSize == size.small:
carSize2=print("small")
elif carSize==size.medium:
carSize2= print("medium")
elif carSize==size.big:
carSize2= print("big")
startHour = input("Input the hour when you entered the parking lot(in 24h time please, no leading zeroes): ")
startMinute = input("Input the minute when you entered the parking lot: ")
endHour = input("Input the hour when you exited the parking lot(in 24h time please, no leading zeroes): ")
endMinute = input("Input the hour when you exited the parking lot: ")
file.write(
number + " " + carSize2 + " " + name + " " + "you entered the parking lot at " + startHour + ":" + startMinute + " and left at " + endHour + ":" + endMinute)
print("OK!")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…