+ 1

What's the difference between print("whatever") and print ("whatever")? Space between print and ( Does it make the file bigger?

Python general Syntax Question

12th Aug 2017, 2:46 AM
Markus MF
Markus MF - avatar
5 Answers
+ 6
Putting necessary indentations aside, the effects of removing whitespaces is negligible, size and performance wise.
12th Aug 2017, 3:47 AM
Hatsy Rei
Hatsy Rei - avatar
+ 11
It increases your script file by 1 byte, does not affect the program execution.
12th Aug 2017, 2:55 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
@Markus The whitespace between print and its parenthesis usually don't contribute much to readability, but it is all up to the programmer to decide if it makes things more comfortable.
12th Aug 2017, 3:03 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
So then it makes sense to reduce the spaces in a big code, right? Or is it not worth it to lose readability?
12th Aug 2017, 3:00 AM
Markus MF
Markus MF - avatar
0
And does it makes sense to get rid of all whitespaces in the code due to a small file size? Or is this irrelevant?
12th Aug 2017, 3:08 AM
Markus MF
Markus MF - avatar