Is there a difference? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

Is there a difference?

"""Is there a difference?""" print('Hello World!') print("Hello World!") print("Hello World!"); print('Hello World!'); output: Hello World! Hello World! Hello World! Hello World!

26th Apr 2018, 5:26 AM
GroundState
GroundState - avatar
1 Réponse
+ 4
On just the semicolons, tested with a bytecode disassembler: Python does not appear to generate extra opcodes (instructions) for the semicolons, even if you use them as intended, to separate same-line statements: print(...); print(...) There may be a preprocessor effect (?) but I suspect it's negligible. [meta] Just to be complete... https://code.sololearn.com/cxYMW29npKWp/?ref=app
26th Apr 2018, 5:50 AM
Kirk Schafer
Kirk Schafer - avatar