Sep-17-2018, 03:03 AM
Use Python3, don't learn 2.
With print statements, is it true you can not combine different types with a operator concatenation? You can only print out with a comma?
For example:
but,
I could try this out myself but I ran into an error this week with this and thought I'd throw it out there.
Actually, just cause now I'm curious, that is the correct result.
With print statements, is it true you can not combine different types with a operator concatenation? You can only print out with a comma?
For example:
print('He', 110, ' World')will work,
but,
print('He' + 110 + ' World)will not.
I could try this out myself but I ran into an error this week with this and thought I'd throw it out there.
Actually, just cause now I'm curious, that is the correct result.
print('He' + 110 + 'World) File "<stdin>", line 1 print('He' + 110 + 'World) SyntaxError: EOL while scanning string literalversus:
print('He',110, 'World') He 110 WorldPhil