Python 中range len 和for index
num = [1, 2, 3, 4, 5, 6, 7, 8] print(len(num)) print(range(len(num))) for index in range(len(num)): print("the {} element is {}".format(index, num[index]))
------------------------- A little Progress a day makes you a big success... ----------------------------