我要求用户输入一个数字,我要在其中打印列表中该索引点处的项目.
这是我目前的代码:
List = ["a", "b", "c", "d", "e", "f"]
print "The list has the following", len(List), "list:", List
new_item = raw_input("Which item would you like to add? ")
List.append(new_item)
print "The list has the following", len(List), "items:", List
Number = raw_input ("Please select a number: ")
Run Code Online (Sandbox Code Playgroud)