{"id":137,"date":"2026-03-20T08:06:23","date_gmt":"2026-03-20T08:06:23","guid":{"rendered":"https:\/\/alpeshconnect.in\/blog\/?p=137"},"modified":"2026-03-20T08:06:23","modified_gmt":"2026-03-20T08:06:23","slug":"remove-duplicate-characters-from-text-in-python","status":"publish","type":"post","link":"https:\/\/alpeshconnect.in\/blog\/2026\/03\/20\/remove-duplicate-characters-from-text-in-python\/","title":{"rendered":"Remove Duplicate Characters from Text in Python"},"content":{"rendered":"\n<p>Remove duplicate characters from it and make a line of text unique.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Remove duplicate characters from text<\/h1>\n\n\n\n<p>text = input(&#8220;Enter a line of text: &#8220;)<\/p>\n\n\n\n<p>result = &#8220;&#8221;<\/p>\n\n\n\n<p>for ch in text:<br>if ch not in result:<br>result = result + ch<\/p>\n\n\n\n<p>print(&#8220;Unique text:&#8221;, result)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remove duplicate characters from it and make a line of text unique. Remove duplicate characters from text text = input(&#8220;Enter a line of text: &#8220;) result = &#8220;&#8221; for ch in text:if ch not in result:result = result + ch print(&#8220;Unique text:&#8221;, result)<\/p>\n","protected":false},"author":1,"featured_media":96,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,44],"tags":[25,26,46,45],"class_list":["post-137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bca","category-programming-skills","tag-bca","tag-bca-paper-solution","tag-programming-skills","tag-python"],"_links":{"self":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":1,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions\/138"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/media\/96"}],"wp:attachment":[{"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alpeshconnect.in\/blog\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}