python的print函数的用法(集合)
a=99
print(id(a))#id(a)函数是求取a的存储地址
print(a)#输出a所表示的值,即99
print('hello word')
print("hello word")
print(10)
print(str(10))
print('hello')
print('word')
print(' hello',
' word')
print('hello\nworld')#\n的作用是换行
print('i\nlike\nyou')
python中的+号的作用,即数值的加减乘除,求余,取整
#+号的作用第一就是将两个部分进行合并
print('hello'+'123')
print('hello'+str(123))
print(1+2)
print('1+2')
print(float(1.5)+2)
# //是取整
# + - * / %
# **次方
#一般不强调数值的类型时,就是int型,浮点型是float
print(1+2)
print(1-3)
print(4*3)
print(2**4)#相当于2的四次方
print(4/2)
print(4/3)
print(8%7)
print(9//3)
a=3
b=6
c=7
d=10+b
a=a+3
print(d)
print(a,b,c,d)
print(a+b)
print(a)
f1=12.23#浮点型
f2=13.45
f3=f1+f2
print(f3)
print(f1,f2)
string1='hello'#字符型
string2='world'
print(string1+string2)
print(string1,string2)
string3=string1+string2
print(string3)
print('a+b=',a+b)