python中变量类型转换
>>> a = 5
>>> a
5
>>> type(a)
<class 'int'>
>>> b = float(a)
>>> b
5.0
>>> type(b)
<class 'float'>
>>> c = 5.3
>>> c
5.3
>>> type(c)
<class 'float'>
>>> d = int(c)
>>> d
5
>>> type(d)
<class 'int'>
>>> e = 5
>>> e
5
>>> type(e)
<class 'int'>
>>> f = str(e)
>>> f
'5'
>>> type(f)
<class 'str'>
>>> g = "5"
>>> g
'5'
>>> type(g)
<class 'str'>
>>> h = int(g)
>>> h
5
>>> type(h)
<class 'int'>