摘要:
# author: Roy.G# a=[2*i for i in range(10)] #this is a list# a=print(a)# b=(2*i for i in range(1000)) #this is a ganerator# # print(b)# # for i in b:# 阅读全文
摘要:
# author: Roy.G# a=[2*i for i in range(10)] #this is a list# a=print(a)# b=(2*i for i in range(1000)) #this is a ganerator# # print(b)# # for i in b:# 阅读全文
摘要:
# author: Roy.G'''x=lambda x,y:x**3+y**3a=x(3,3)print(a)'''# def a(a):# a=2*a# a=b(a) # this b(a) just is a str ,not a function ,so it has no problem# 阅读全文
摘要:
author: Roy.G 20211230import sysimport sysimport mathimport matplotlib.pyplot as plt'''def fun_1(): print("fun_1") return 1def fun_2(): print("fun_1") 阅读全文
摘要:
# author: Roy.G 20211230import sysimport timeimport math'''def fun_1(): print("fun_1") return 1def fun_2(): print("fun_1")x=fun_1()y=fun_2()print(x)pr 阅读全文
摘要:
s=u"你好"print(s)print(s.encode().decode("gbk")) 阅读全文
摘要:
# author: Roy.Gimport wsgiref.handlers'''data=open("file_1.txt",encoding="utf-8")print(data)print(data.read())print(" ")print(data.read()) # cursor is 阅读全文
摘要:
# author: Roy.Glist_1=[1,2,3,4,5,6,7,7,7,7,7,7,8,]set_1=set(list_1) #change list to setset_2={1,2,3,4,6,7,8,9,10}print(list_1,type(list_1))print(" ")p 阅读全文
摘要:
# author: Roy.Ginfo={"1":"a", "2":"b", "3":"c", "4":"d", "5":"e",}print(info)print(info["1"])info["1"]="wusong"print(info["1"])info["7"]="luzhish 阅读全文
摘要:
# author: Roy.Ga="my name is \t roy.guo,i am {year} years old,i like {frute}"print(a.center(60,"-")) # .center print 50 character,center the string an 阅读全文