반응형
python list
1.소스
list1 = [] for n in range( 0 , 4 ) : list1 += [ n ] print "list1 = " , list1 for it in list1 : print it print print "list1[2] = %d " % list1[2] list1[3] = 5 print "list1[3] = %d " % list1[3]
결과
acker@ubuntu:~/python$ python list1.py list1 = [0, 1, 2, 3] 0 1 2 3 list1[2] = 2 list1[3] = 5
반응형