python - 输入和打印

标签 python string variables

我试图在“选择:”之后输入一个输入,但我也想在整个文本中继续“*”...即使在尝试多次变化和之后我也不知道该怎么做研究我找不到答案......

print("  ********School Quizes********  ")
print("  *                           *  ")
print("  *       A) Register         *  ")
print("  *       B) Loging           *  ")
print("  *       C) Quit             *  ")
print("  *                           *  ")
input("  *                Choice: ") & print(" *  ")

这样就打印出“Choice:(here will be the input) *”

最佳答案

从技术上讲,你可以这样做:

print("  ********School Quizes********  ")
print("  *                           *  ")
print("  *       A) Register         *  ")
print("  *       B) Loging           *  ")
print("  *       C) Quit             *  ")
print("  *                           *  ")
input("  *       Choice:             *  ")

引号中的所有文本只是充当提示文本,这就是它起作用的原因。

关于python - 输入和打印,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47294758/

相关文章:

Excel VBA For 带有 IF 和变量的嵌套循环

python - 关于Q对象和外键的谜题

Python/Plotly 甘特图 : a marker to indicate current date in timeline?

python : write to COM in ISO 8859-1

objective-c - 子字符串在字符串中出现的次数

python - 如何为列表的每个元素分配不同的变量

c++ - 如何根据变量的值运行不同的函数?

python - pandas 数据框中的列到行

java - 如何将数字字符串转换为字符

python - 删除字符串python中的空格和破折号