list looping error

Gigs_ gigs at hi.t-com.hr
Fri Dec 29 07:16:25 EST 2006


i have created list x:
 >>> x = [(12, 22, 11), (13, 22, 33)]

and want to print each number in tuple
 >>> for i in x:
	for j in i:
		print j[0]

but I get this error. What does it means?		
Traceback (most recent call last):
   File "<pyshell#60>", line 3, in <module>
     print j[0]
TypeError: 'int' object is unsubscriptable


thanks



More information about the Python-list mailing list