关于input的含义

关于input的含义,是这样的:
input需要在控制台中选择对象进行输入。然后将输入的值以字符串(str)的形式传递给对应的变量。
input中()中可以添加已有的字符串或者由引号扩起来的内容。

prompt = 'tell me something,I will print it.'
prompt += '\n Enter quit to end the program'

message = ''
while message != 'quit':
    message = input(prompt)

    if message != 'quit':
        print(message)
发布了7 篇原创文章 · 获赞 0 · 访问量 83

猜你喜欢

转载自blog.csdn.net/xiaoeai/article/details/94374638