How to Add a Variable to Another Variable in Python


In this example, we will learn how to add a variable to another variable use the + character in Python.

Source Code

text1 = 'I love'
text2 = ' Python!'
print(text1 + text2)

Output:

I love Python!
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments