Python string concatenation
#Python String concatenation Example
a = "Python" b = "scripting" print (a+b) #output #Pythonscripting # Adding space in two word print (a+" "+b) #Python scripting #Adding new line between words print (a+'\n'+b) #Python #scripting #concatenation using Join print (' '.join([a, b])) #Python scripting #two String join print (' '.join(["Hello", "World"])) #Hello World #Join using different character print (','.join(['apple','banana','strawberry'])) #apple,banana,strawberry x="hello" y="world" result = x+y print (result) #helloworld result = 'Hello' +' ' +'World' print (result) #hello world |
Great Article. I found so many interesting stuff in your blog Helped a lot in increasing my knowledgevisit site
ReplyDelete