点击运行
#!/usr/bin/python tup1 = ('physics', 'chemistry', 1997, 2000) tup2 = (1, 2, 3, 4, 5, 6, 7 ) print "tup1[0]: ", tup1[0] print "tup2[1:5]: ", tup2[1:5]
运行结果 :
正在执行...