name = 'Ghost' age = 18 print( "My name is ",name,"." "I'm ",age, " years old",".", sep = '' )
参数 sep默认为空格
name = 'Ghost' age = 18 print("My name is",name+".",end='') print("I'm",age,"years old.")
参数end默认为换行符( )
name = 'Ghost' age = 18 print("My name is %s,I'm %d years old"%(name,age))
格式化输入 %s、%d占位符,分别接受任意字符和数字