您的位置:首页 > 编程语言 > Python开发

第17节--python的输入输出(IO)

2016-10-31 10:21 267 查看

python的输入输出语句

输入:

input()


输出:

str()

format


code

str_1 = input("enter a string: ")
str_2 = input("enter another string: ")

print("str_1 is "+str_1+",str_2 is "+str_2)
print("str_1 is {} and str_2 is {}".format(str_1,str_2))


console

enter a string: hello
enter another string: world
str_1 is hello,str_2 is world
str_1 is hello and str_2 is world
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: