d岁"%a) %d 占位符 a进行赋值
print("我的国际是%s,我的名字是%s"%(country,name)) 多个值进行绑定
print("www","baidu",...options
--trusted-host mirrors.aliyun.com
循环
'''while循环'''
i=0
while i <100:
print("第%d次循环"%i)...(a, b):
return a // b, a % b # 返回多个值
# 多个返回值 多个对象接受
s, y = div(1, 2)
print("========", s, y)...sum(a, b, c)
return a // 3
line()
nLine(222)
print(sum(1, 2, 3))
print(avg(1, 2, 3))
#全局变量和局部变量...def test2(self):
print(self.a)
a=A
a.test2(a)
文件
f = open("test.txt", "w") # w写入模式 文件不存在既新建