+ 1
Please must you use concatenation? Cant you write the code without it, like; print("First string , second string")
print("First string" + ", " + "second string")
6 Respuestas
+ 2
Then, no, you don't always need to use concatenation. It depends on what you're doing. You can use other methods like format or f-strings. Print wil also take comma separated values.
a = 1
b = 2
c = 3
print(a, b, c)
print("a is {}, b is {}, c is {}".format(a, b, c))
https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/ref_string_format.asp
print(f"a is {a}, b is {b}, c is {c}")
https://realpython.com/python-f-strings/
+ 2
Thank you so much ChaoticDawg
+ 1
Yes you MUST
+ 1
What language?
+ 1
Python sir
0
Thank you.