Python mange with liste

Bala Ji baladjy at gmail.com
Sun Dec 29 11:19:17 CET 2013



hello,

thank you for your help

i wrote this:

x="nam1"
y="F"

names = [("nam1", "F", "Y"), ("nam2", "M", "N")]
l = len(names)
for i in range(0,l):
	print names[i][0]
	print names[i][1]
	if x == names[i][0] and y == names[i][1]:
		message = "right"
	else:
		message = "wrong"
	
print message


normally it must tell me "right" but it tells me "wrong"

best



More information about the Python-list mailing list