I want to append the date2 from this function into
def date_register():
print("Enter date of registration")
year = int(input("Enter a year: "))
month = int(input("Enter a month: "))
day = int(input("Enter a day: "))
date1 = datetime.date(year,month,day)
date2 = date1 + timedelta(days = 140)
print("Check out date:",date2)
this function and it came out date2 is not defined
def update_A(row): #to update the roomA
if len(roomA[row]) < 2: #if roomA is less than 2
name = input("Enter your name here: ")
print(date_register())
roomA[row].append((name,date2))
print("Your room no. is {} at row {}".format(roomA[row].index((name,date2))+1,row))
print(Continue())
Seeking for help thank you