def display_data(): print("There are", len(Comps), "pupils in the system so far.") for index in enumerate(Comps): lst = Attempts[index] for i, num in enumerate(lst): if num == -1: lst[i] = "X" lst = map(str, lst) print(name + ", " + ", ".join(lst))
Alternative of this mini code without Enumerate and join function.
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Code Review: Range and Enumerate | lummers | 2 | 2,871 |
Jan-11-2020, 12:40 AM Last Post: lummers |
|
How to transform an enumerate object into a dictionary | fad3r | 7 | 6,684 |
Feb-11-2018, 11:42 PM Last Post: Larz60+ |
|
enumerate and output control | atux_null | 7 | 6,464 |
Oct-24-2017, 06:50 PM Last Post: Mekire |
Users browsing this thread: 1 Guest(s)