1.类型转换
name='宁颂姝'
age=1
print('我叫'+name+',今年'+str(age)+'岁')
a=2
b=4.4
c=False
print(type(a),str(a),type(str(a)))
print(type(a),float(a),type(float(a)))
print(type(b),int(b),type(int(b)))
print(type(c),int(c),type(int(c)))
print(type(c),float(c),type(float(c)))
2.注释
#coding:utf-8
#中文编码声明,指定源码文件编码格式
# #输出函数
print('hello')
'''
输出
函数'''
print('hello')
标签:name,python,float,day2,int,str,print,type
From: https://blog.51cto.com/u_16080683/7402023