Posts

Showing posts from February, 2026

string concatenation in python

Image
 String concatenation is just a fancy way of saying joining strings together to make one longer string. Here’s the idea in plain terms 👇 If you have: "Hello" "World" Concatenation gives you: "HelloWorld" (or "Hello World" if you add a space) Common uses Making sentences Displaying messages Joining names, paths, or data Example: name = "Jayanth" print ( "Welcome " + name) String concatenation in Python allows us to combine two or more strings into one. In this article, we will explore various methods for achieving this. The most simple way to concatenate strings in Python is by using the  + operator . Using + Operator Using  + operator   allows us to concatenation or join strings easily. s1 = "Hello" s2 = "World" res = s1 + " " + s2 print ( res ) Output Hello World Explanation: s1 + " " + s2  combines  s1  and  s2  with a space between them. Note...