Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
Can anyone tell me how to concatenate two strings in Python?

1 Answer

0 votes
by (107k points)

For concatenating or joining any two strings in Python, you need to use the + operator. Refer to the below code for implementation:

var1 = "Hello "

var2 = "World"

# + Operator is used to combine the strings 

var3 = var1 + var2 

print(var3) 

The output:

Hello World

If you are looking for an online course to learn Python, I recommend this Python Course by Intellipaat.

Related questions

0 votes
1 answer
asked Apr 28, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Mar 23, 2021 in Java by sheela_singh (9.5k points)
+2 votes
3 answers

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...