I'm having those two functions in my code and want to be able to use the variable tdate from the function def todos_new(): in my second function def todos_print():.
Thanks for your input!
def todos_new(): tid = 139283983 ttext = "text" tdate = "2018-12-12" new = tclass.ToDo(tid, ttext, tdate) todos.append(new) def todos_print(): datesearch = input('Search Date YYYY-MM-DD:') if datesearch < todos(tdate):#NameError: name 'tdate' is not defined print(todos)Any idea how I can use that variable in my second function without return in my first function?
Thanks for your input!