{"id":38,"date":"2022-08-29T01:25:54","date_gmt":"2022-08-29T01:25:54","guid":{"rendered":"https:\/\/python.freelinuxtutorials.com\/?p=38"},"modified":"2022-08-29T01:28:40","modified_gmt":"2022-08-29T01:28:40","slug":"string-concatenation","status":"publish","type":"post","link":"https:\/\/python.freelinuxtutorials.com\/index.php\/2022\/08\/29\/string-concatenation\/","title":{"rendered":"Python>>String Concatenation"},"content":{"rendered":"<p>String concatenation is simply adding strings together.<\/p>\n<p>Here are sample String Concatenation:<\/p>\n<p>Sample1:<\/p>\n<blockquote><p>&gt;&gt; a = &#8216;Free&#8217;<br \/>\n&gt;&gt;&gt; b = &#8216;Linux&#8217;<br \/>\n&gt;&gt;&gt; c = &#8216;Tutorials&#8217;<br \/>\n&gt;&gt;&gt; a + b + c<br \/>\n&#8216;FreeLinuxTutorials&#8217;<br \/>\n&gt;&gt;&gt; d = a + b + c<br \/>\n&gt;&gt;&gt; print (d)<br \/>\nFreeLinuxTutorials<br \/>\n&gt;&gt;&gt;<\/p><\/blockquote>\n<p>Sample2:<\/p>\n<blockquote><p>&gt;&gt;&gt; a = &#8216;Welcome&#8217;<br \/>\n&gt;&gt;&gt; b = &#8216;to my&#8217;<br \/>\n&gt;&gt;&gt; c = &#8216;Site&#8217;<br \/>\n&gt;&gt;&gt; s = &#8216; &#8216;<br \/>\n&gt;&gt;&gt; a + s + b + s + c<br \/>\n&#8216;Welcome to my Site&#8217;<br \/>\n&gt;&gt;&gt; d = a + s + b + s + c<br \/>\n&gt;&gt;&gt; print (d)<br \/>\nWelcome to my Site<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>Sample3:<\/p>\n<blockquote><p>&gt;&gt; &#8216;Welcome&#8217; + &#8216; Guys&#8217;<br \/>\n&#8216;Welcome Guys&#8217;<\/p><\/blockquote>\n<p>Sample4:<\/p>\n<blockquote><p>&gt;&gt; str = &#8216;Welcome&#8217;<br \/>\n&gt;&gt;&gt; str = str + &#8216; to my Site&#8217;<br \/>\n&gt;&gt;&gt; print (str)<br \/>\nWelcome to my Site<\/p><\/blockquote>\n<p>Sample5:<\/p>\n<blockquote><p>&gt;&gt; print (str)<br \/>\nWelcome to my Site<br \/>\n&gt;&gt;&gt; str = str[0:7] + &#8216; to my World&#8217;<br \/>\n&gt;&gt;&gt; print (str)<br \/>\nWelcome to my World<\/p><\/blockquote>\n<p>Sample6:<\/p>\n<blockquote><p>&gt;&gt; str = &#8216;Knock! &#8216;<br \/>\n&gt;&gt;&gt; print (str)<br \/>\nKnock!<br \/>\n&gt;&gt;&gt; str * 6<br \/>\n&#8216;Knock! Knock! Knock! Knock! Knock! Knock! &#8216;<\/p><\/blockquote>\n<p>Sample7:<\/p>\n<blockquote><p>&gt;&gt; x = 10<br \/>\n&gt;&gt;&gt; y = 10<br \/>\n&gt;&gt;&gt; x + y<br \/>\n20<br \/>\n&gt;&gt;&gt; x = &#8217;10&#8217;<br \/>\n&gt;&gt;&gt; y = &#8217;10&#8217;<br \/>\n&gt;&gt;&gt; x + y<br \/>\n&#8216;1010&#8217;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>String concatenation is simply adding strings together. Here are sample String Concatenation: Sample1: &gt;&gt; a = &#8216;Free&#8217; &gt;&gt;&gt; b = &#8216;Linux&#8217; &gt;&gt;&gt; c = &#8216;Tutorials&#8217; &gt;&gt;&gt; a + b + c &#8216;FreeLinuxTutorials&#8217; &gt;&gt;&gt; d = a + b + c &gt;&gt;&gt; print (d) FreeLinuxTutorials &gt;&gt;&gt; Sample2: &gt;&gt;&gt; a = &#8216;Welcome&#8217; &gt;&gt;&gt; b = &#8216;to my&#8217;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[3],"tags":[10,9],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-data-types","tag-concatenation","tag-string"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":6,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/posts\/38\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python.freelinuxtutorials.com\/index.php\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}