python 字符串

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

九三
759
2021-01-20 17:00:20
栏目: 编程语言

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))

0
看了该问题的人还看了