gistlib
To concatenate two or more strings into a single string, you can use the '+' operator.
main.pytext1 = "Hello" text2 = "World" text3 = "!" result = text1 + " " + text2 + text3 print(result) 95 chars6 lines
text1 = "Hello" text2 = "World" text3 = "!" result = text1 + " " + text2 + text3 print(result)
Output: "Hello World!"
You can add any number of strings in a single line by separating them with a '+'.
gistlibby LogSnag