Created
September 7, 2017 16:58
-
-
Save anonymous/4b752ddef3387e61c4594f0770d8ecdd to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ def removeCoin(): coinlist = ["a", "b", "c", "d"] while True: print("\nThe list of coins you're currently tracking is: \n" + "\n".join(coinlist) + "\n") yes_or_no = input("Do you want to remove a coin from the list? (Y/N):").upper() if yes_or_no == "Y": try: coinlist.remove(input("Which coin do you want to remove?").upper()) print("\nThe list of coins you're currently tracking is: \n" + "\n".join(coinlist) + "\n") except ValueError: print("There is no such coin in the list") if yes_or_no == "N": return coinlist else: "You didn't input a valid coin" removeCoin()