목록을 변경하기위한 옵션 집합을 보여주는 목록을 만들려고합니다. 하지만 작동하지 않는 사람이 나에게 무엇이 잘못되었는지 말해 줄 수 있습니다.간단한 파이썬 메뉴 만들기
menulist=("1. Print the list",
"2. Add a name to the list",
"3. Remove a name from the list",
"4. Change an item in the list",
"9. Quit")
list=("johny","tom","kim","tim","jim")
target=input("Pick an item from the menu:")
while (target in list):
if target="1"
print list
elif target="2"
Addname=input("Type in a name to add:")
list=list.insert(Addname)
print menulist()
elif target="3"
Removename=input("What name would you like to remove:")
list=list.remove(Removename)
print menulist()
elif target="4"
Changename=input(What name would you like to change:")
changetoname=input("What is the new name:")
list=list.replace('Changename','changetoname')
print menulist()
elif target="9"
print"good bye"
당신은 더 개방 없어 한 "당신의'ELIF 타겟을 ="4 "'지점 – akluth
당신은 어떤'등 다양한 구문 오류가 있습니다'조건문 후, 당신은 할당 연산자를 ('사용하고 =을 ') 당신이 비교를 원할 때 ('=='), 등등. 파이썬에 대한 서적을 가지고 시작해야 할 것입니다. –
파이썬에서이 코드가 있습니까? –