#用户输入,操作
print("python 用户输入操作")
# input(提示字符串),函数阻塞程序,并提醒用户输入字符串
instr = input("please input the string: ")
print("input >> " + instr)
# 将输入的字符串转化成整数 int(str)
print("input to int >> " + str(int(instr)))
# 练习,输入字符串为exit时才退出用户输入
while input("please input: ")!="exit":
print("input error")
更多参考
https://blog.csdn.net/weixin_43889841/article/details/90234825
https://www.cnblogs.com/xy2656141474/p/14222887.html
https://www.cnblogs.com/tizer/p/10958018.html