tuple
tuple 1.소스 tuple1 = 1,2,3 tuple2 = (4,5,6) print "tuple1 " , tuple1 print "tuple2 " , tuple2 print "tuple 1" for n in tuple1 : print n print print "tuple 2" for n in tuple2 : print n print print "tuple 1 : index " for i in range(0,len(tuple1) ) : print tuple1[i] 결과 hacker@ubuntu:~/python$ python tuple1.py tuple1 (1, 2, 3) tuple2 (4, 5, 6) tuple 1 1 2 3 tuple 2 4 5 6 tuple 1 : index 1 2 3
2016. 7. 21.