나는 그의 이름을 입력 할 때 존스 번호를보고 싶습니다. 먼저이 작업을 수행 할 수 :파이썬 사전이 다른 경우
def liste_kontrol(liste):
liste=raw_input("Name pls:")
if liste=="john":
print "now u seeng on list",john,"number."
else:
print "cant found"
liste={"john":002050505",}
liste_kontrol(liste)
아마도 다음 :
이상적으로def liste_kontrol(liste):
liste=raw_input("Name pls:")
if liste=="john" or "jack:
print "now u seeng on list", john, or jack, "number."
else:
print "cant found."
liste= {"john":"002050505","jack":"0551282"}
liste_kontrol(liste)
당신이 당신의 자기 –
와트를 설명 얻었다. 와트? 와트! – kindall
시도하십시오! 넌 할 수있어! – Marcin