用python编写一个简单的小程序:将文字对应的索引打印出来. test=input('>>>') print(test) l=len(test) print(l) r=range(l) for item in r: print(item,test[item]) 以上为了练习步骤繁琐,下面程序比较简单. test=input('>>>') for item in range(len(test)): print(item,test[item]) 其实两个程序功能原理完全一
终端彩色文字 class Color_f: black = 30 red = 31 green = 32 yellow= 33 blue = 34 fuchsia=35 cyan = 36 white = 37 color_list = [30,31,32,33,34,35,36,37] class Color_b: black = 40 red = 41 green = 42 yellow= 43 blue = 44 fuchsia=45 cyan = 46 white = 47 color_