Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def remove_and_replace(tech_companies):
- remove = input("Enter the list to remove: ")
- if remove in tech_companies:
- idx = tech_companies.index(remove)
- replace = input("Enter your replace here: ")
- tech_companies[idx] = replace
- return tech_companies
- print(remove_and_replace(["Google", "Microsoft", "Blackberry", "IBM", "Yahoo"]))
Add Comment
Please, Sign In to add comment