+ 1
\n separation
Is print("\n") the only and the best way to separate two "programmes" In my code? https://sololearn.com/compiler-playground/c3ooeKRt5ooI/?ref=app
4 Respuestas
+ 7
Rebecca Harris as far on sololearn yes an empty print() or using a newline "\n"
+ 5
print() gives you 1 empty line, and print('\n') gives you 2 empty line.
If you want an empty line before print, it can also be done in this way.
print('\nHello world')
+ 1
Well you can do print("\n" + sorted(cars)). One line makes it look better if that is how you mean "best"
+ 1
if you want a fancy horizontal line, you can use
print("\n----------------\n")