{"id":8115,"date":"2018-08-26T13:21:01","date_gmt":"2018-08-26T13:21:01","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=8115"},"modified":"2018-08-26T18:08:34","modified_gmt":"2018-08-26T18:08:34","slug":"python3-string-concatenation","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=8115","title":{"rendered":"Python 3 String"},"content":{"rendered":"<h3>Concatenation<\/h3>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/19926089\/python-equivalent-of-java-stringbuffer\">Python equivalent of Java StringBuffer?<\/a> (Python 3, 2013)<br \/>\n<a href=\"https:\/\/waymoot.org\/home\/python_string\/\">Efficient String Concatenation in Python<\/a> (Python 2, 2004)<\/p>\n<h3>Iterate<\/h3>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/538346\/iterating-over-a-string\">Iterating over a string<\/a><br \/>\n&#8220;Simply implement an iterator that defines a next() method, and implement an __iter__ method on a class to make it iterable.&#8221;<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ns = 'abcde'\r\nfor c in s:\r\n    print(c)\r\n<\/pre>\n<h3>Reverse<\/h3>\n<p><a href=\"https:\/\/www.geeksforgeeks.org\/reverse-string-python-5-different-ways\/\">Reverse string in Python (5 different ways)<\/a><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ns = s&#x5B;::-1]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Concatenation Python equivalent of Java StringBuffer? (Python 3, 2013) Efficient String Concatenation in Python (Python 2, 2004) Iterate Iterating over a string &#8220;Simply implement an iterator that defines a next() method, and implement an __iter__ method on a class to make it iterable.&#8221; s = &#8216;abcde&#8217; for c in s: print(c) Reverse Reverse string in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8115","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8115"}],"version-history":[{"count":7,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8115\/revisions"}],"predecessor-version":[{"id":8137,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8115\/revisions\/8137"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}