Fifa
Fifa

Reputation: 21

TypeError Python String Format

I am trying to print a header but this is the error I keep getting: TypeError: not all arguments converted during string formatting. This is my code:

print("%10s$20s%20s \n" % ("Year", "Data Breaches", "Records Exposed"))

Thanks

Upvotes: 1

Views: 52

Answers (1)

Gabio
Gabio

Reputation: 9494

There is a typo - replace $ with % (5th character)

Upvotes: 1

Related Questions