dongman =["huoying","sishen","si wang bi ji","pan ni de lu lu xiu"]; print(dongman[0:2]) print(dongman[1:4]) print(dongman[:3])#from the first one print(dongman[2:])# from third number to the last print(dongman[-3:]…
list = ['html', 'js', 'css', 'python'] # 方法1 # 遍历列表方法1:' for i in list: print("序号:%s 值:%s" % (list.index(i) + 1, i)) # 遍历列表方法2:' # 方法2 for i in range(len(list)): print("序号:%s 值:%s" % (i + 1, list[i])) # 方法3 # 遍历列表方法3:' for i, val in en…