This program produces a service key based on the current month and the store number. The last four numbers of the variable "key" is the key. Depending on the month and the store number the result may be four digits or it may be more. I just need to print out the last four digits of the variable "key" weather its four digits or forty. Not sure what to do from here
from datetime import datetime
now = datetime.now() # current date and time
def main():
month = now.strftime("%m")
month = int(month)
store = input("What is the four digit store number? ")
storen = store[::-1]
storenn = int(storen)
value1 = storenn + month
value2 = value1 * month
value3 = str(value2)
value4 = value3.split()
value5 = str(value4)
key = value5[4:-1]
print(key)
main()