How to Concatenate Or Combine Two Strings in Python


In this example, we will learn how to concatenate or combine two strings using the + operator in Python.

Source Code

my_str1 = 'I love'
my_str2 = 'Python'

my_str3 = my_str1 + ' ' + my_str2

print(my_str3)

Output:

I love Python

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Advertisement