#我的第一个python程序PRint("hello world");#多行字符串print("""/Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to""");#转义字符的作用print("this /'s book");#保留字符串中字符前面加rprint(r"c:/nbacet");#长的字符串显示str=("hello jack apple banana" "ffdfjejiejije");print(str);#字符串相加print("fff"+"fjjfds");print(str[0]);#del(str);print("ddjdd"+str);#del(str);#print("ddjdd"+str);world="python";#print(world[-1]);#print(world[-2]);#print(world[0:2]);print(world[2:]);del(world);del(str);s=("ddddd");print(len(s));del(s);#数组的运用m=[1,2,3,5,6,7];n=[m,43,45,67,76];print(n[0][1]);print(m);z=m+n;print(z);m[0]=9;print(m);#copy 一个新的数组print(m[:]);
新闻热点
疑难解答