How can I store values in lists and later compare against each other
all_click = []                                            
all_click_red = []
while True:
    a = input('give a number: ')                          
    b = input('give a second number: ')
    if a == 1:
        all_click.append(a)                               
    if b == 1:                                            
        all_click_red.append(b)                           
    if all_click_red[-1] and all_click[-1] == 1:          
        print('all good')                                 
    else:                                                 
        print('false')     
Because I get an error like this:
 if all_click_red[-1] and all_click[-1] == 1:
     IndexError: list index out of range
 
     
    