我今天正在写一些代码,只是一个小脚本,它最多占用三个字符串,并把它们弄乱,颠倒它们,并将它们按不同的顺序排列。当我尝试运行我的代码时,我收到一个无效的语法错误,但我真的不知道为什么。
ammount = int(input("How many strings would you like to input? 1, 2 or 3?")
# Getting user input
if ammount == 1:
input1 = str(input("Please enter the first string"))
elif ammount == 2:
user_input_1 = str(input("Please enter the first string"))
user_input_2 = str(input("Please enter the second string"))
elif ammount == 3:
user_input_1 = str(input("Please enter the first string"))
user_input_2 = str(input("Please enter the second string"))
user_input_3 = str(input("Please enter the third string"))
翻翻过去那场雪
隔江千里
相关分类