Instagram
youtube
Facebook
Twitter

Two Strings Without Using join() Method

A Python program that demonstrates how to concatenate two strings using the + operator.

Here's a  explanation in bullet points:

  • str1 = "Hello" → First string is assigned to str1.
     
  • str2 = "World" → Second string is assigned to str2.
     
  • result = str1 + str2 → The + operator is used to concatenate (combine) str1 and str2.
     
  • The result is stored in the variable result.
     
  • print("Concatenated String:", result) → Displays the concatenated string on the screen.

 

Program:

str1 = "Hello"

str2 = "World"

# Concatenation using '+' operator

result = str1 + str2

# Output the result

print("Concatenated String:", result)