Python注释
以# 为行开头为注释
相关函数
str() --- 传入一个整型值,并求值为它的字符串形式
Python 2.7.17 (default, Mar 8 2023, 18:40:28)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> str(94343)
'94343'
>>> print('I am' + str(18) + 'Years old.')
I am18Years old.
>>> print('I am' + str(18) + 'Years old.')
I am18Years old.
>>> print('I am ' + str(18) + ' Years old.')
I am 18 Years old.
>>>
int() --- 与str()将输入值转换为字符串相反,int()函数将字符串数据作为输入,输出为整数!
>>> int(1234)
1234
>>> int(34)
34
>>> int(-9990)
-9990
float() --- 将输入字符串求取浮点数形式的值
>>> float(1099)
1099.0
>>> float(-999)
-999.0
标签:注释,old,Python,18,am,语法,int,str
From: https://www.cnblogs.com/huhuhusanling/p/18365424