+ 2
Formating string with list
How to get rid of '0' before list in the code: scores=['F', 'D', 'C', 'B'] print(f'Scores: {0:20}',scores)
3 Antworten
+ 11
You may be looking for something like this:
scores=['F', 'D', 'C', 'B']
print(f'Scores: {str(scores):>40}')
+ 7
print(f'Scores: {"":20}', scores)
+ 5
use
print(f'Scores: {scores}')
result is
Scores: ['F', 'D', 'C', 'B']