print("nihao",end=" ")
print("woshi")
结果是 nihao woshi 如果不指定END参数 就是换行了
say="hello nihao"
print(say.upper()) #HELLO
print(say.titile()) #Hello Nihao
print (say.low()) #hello nihao
print(say.swapcase()) #HELLO NIHAO 反转大小写
print(say.strip()) #去前后空格 和换行符 制表位
print(say.replase("nihao",“xiaoxu"[,max])) #hello xiaoxu
数据转换
float(x) int(x) str(x)
随机数
import random
print(randm.randint(1,6) = print(random.randrange(6)+1)