main.py72 chars5 lines
Output:
main.py13 chars2 lines
In python, we can concatenate two strings using the +
operator. Here, we first define two strings string1
and string2
. Then, we use the +=
operator to add string2
to the end of string1
. Finally, we print string1
which now contains both the strings concatenated together.
gistlibby LogSnag