Python Program to concatenate two strings (Using join() method)

bookmark

# Python program to  
# string concatenation  
  
str1 = "Hello"  
str2 = "JavaTpoint"  
  
# join() method is used to combine the strings  
print("".join([str1, str2]))  
  
# join() method is used to combine  
# the string with a separator Space(" ")  
str3 = " ".join([str1, str2])  
  
print(str3)  


Output:

HelloJavaTpoint
Hello JavaTpoint