python中使用input函數(shù)讀取字符串,具體方法如下:
input()函數(shù)語法:
str = input(tipmsg)
input()函數(shù)使用方法:
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))