Skip to main content
added 4 characters in body
Source Link
C Panda
  • 3.4k
  • 2
  • 13
  • 11

Do the following,

print(name, points, sep=":", file="Highscores") # Mike:23 

You don't even have to do str(points). Works for any data type. And adds a newline by default. It is very efficientefficient compared to custom acrobatics using .write().(Beazly)

Do the following,

print(name, points, sep=":", file="Highscores") # Mike:23 

You don't even have to do str(points). Works for any data type. And adds a newline by default. It is very efficient compared to custom acrobatics using .write().(Beazly)

Do the following,

print(name, points, sep=":", file="Highscores") # Mike:23 

You don't even have to do str(points). Works for any data type. And adds a newline by default. It is very efficient compared to custom acrobatics using .write().(Beazly)

Source Link
C Panda
  • 3.4k
  • 2
  • 13
  • 11

Do the following,

print(name, points, sep=":", file="Highscores") # Mike:23 

You don't even have to do str(points). Works for any data type. And adds a newline by default. It is very efficient compared to custom acrobatics using .write().(Beazly)