remove input from a list in PYTHON - new to programming -
i trying remove user input list have made can't work.
new programming in general :|
text = ["menu1_test", "menu2_test", "menu3_test", "menu4_test", "menu 5_test"] text_remove = input("what want removed?") def text_remover(text, text_remove): = 0 w in text: text.remove(text_remove[i]) i=i+1 print(w+" removed") text_remover(text, text_remove) print (text)
try https://docs.python.org/2/tutorial/datastructures.html#more-on-lists
read functions available lists , try them out,
text = ["menu1_test", "menu2_test", "menu3_test", "menu4_test", "menu 5_test"] text_remove = input("what want removed?") def text_remover(text, text_remove): text.remove(text_remove) text_remover(text, text_remove) print (text)
Comments
Post a Comment