Linux 拨号vps windows公众号手机端

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

lewis 6年前 (2019-03-19) 阅读数 13 #程序编程
文章标签 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))

版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门