I am writing a program that receives entries and creates a dictionary from them. I need the loop that I use to insert the entries in the dictionary to be broken when the entry is "9999", but it is not working. I'm doing this: dic = dict ()
dic = dict()
gabarito = raw_input()
um = 1
zero = 0
while zero < um:
entrada = raw_input()
lista = entrada.split()
dic[lista[1]] = lista[0]
if entrada == 9999:
break
print dic
What's wrong? How to proceed?