python中用什么函数读取字符串

1259
2021/1/20 17:00:20
栏目: 编程语言
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

python中用什么函数读取字符串

python中使用input函数读取字符串,具体方法如下:

input()函数语法:

str = input(tipmsg)

input()函数使用方法:

a = input("Enter a number: ")

b = input("Enter another number: ")

print("aType: ", type(a))

print("bType: ", type(b))

result = a + b

print("resultValue: ", result)

print("resultType: ", type(result))

辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: python中collect是什么函数