Skip to content

Printing text and numbers

Read · 1 of 5

print takes several things

Separate them with commas and print puts a space between them: print("Score:", 42) prints Score: 42.

Text goes in quotes. Numbers and maths don't. sep="" removes the spaces, and end="" stops print from starting a new line.