python 3.x - Why do I have parenthesis when I print strings plus variables in Python34? -


the code

print("5 + 2 =", 5+2) 

and result ('5 + 2 =', 7)

you don't. using interpreter python 2.

python 2 output:

python 2.7.2 (default, jul 20 2011, 02:32:18) [gcc 4.2.1 (llvm, emscripten 1.5, empythoned)] on linux2 print("5 + 2 =", 5+2) ('5 + 2 =', 7) 

python 3 output:

python 3.4.0 (default, apr 11 2014, 13:05:11) [gcc 4.8.2] on linux print("5 + 2 =", 5+2) 5 + 2 = 7 

Comments