What does the % sign mean in coding?

It is used to format strings (you can read about string formatting in the string docs, also mentioned in Input and Output – old string formatting).

print("pink is %i" %10) 

Output

pink is 10

Leave a Comment