Python: Fix Flake8 E722 and E741

Additionally:

* Use functions to group blocks of code
* Use variable names (not just one character...)
This commit is contained in:
Martin Thoma
2022-03-12 08:17:03 +01:00
parent fc9ea8eaf9
commit af88007734
18 changed files with 846 additions and 764 deletions

View File

@@ -86,7 +86,7 @@ class Stock_Market:
for stock in self.data.keys():
try:
new_holdings.append(int(input(f"{stock}? ")))
except:
except Exception:
print("\nINVALID ENTRY, TRY AGAIN\n")
break
if len(new_holdings) == 5: