I want to code a calendar but there comes an value error and I dont know how to debug my code : I want to code a calendar with two lists in the first are the dates and in the second are the events. I want that you have to input a date if its in the calendar list I want my code to search where it is in the list. Then my code should search what is in the events list at the same location and print the Event.
Thanks for every anser.

p.s. I code with python since  a few weeks so I am still a noob



calendar = ['01.02.2019', '02.02.2019']
termine = ['15:20 playing football', '17:30 playing basketball']


date = str(input('Date: '))
if (date in calendar):           
	print ('found');                                                   
        esindices = [i for i, x in enumerate(calendar) if x == date] 
        print (esindices)
        print(events[int(esindices)])





Date: 01.02.2019
found
[0]

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-17-00e8535c4c6c> in <module>
      8     esindices = [i for i, x in enumerate(calendar) if x == date]
      9     print (esindices)
---> 10     print(events[int(esindices)])

NameError: name 'events' is not defined







This is the Error which comes and I dont know how to solve this.

