{"id":182,"date":"2021-10-30T21:14:28","date_gmt":"2021-10-31T02:14:28","guid":{"rendered":"https:\/\/donaldfcooley.info\/?p=182"},"modified":"2021-10-30T21:14:28","modified_gmt":"2021-10-31T02:14:28","slug":"adding-unicode-characters-to-python-repl","status":"publish","type":"post","link":"https:\/\/donaldfcooley.info\/?p=182","title":{"rendered":"Adding unicode characters to python repl"},"content":{"rendered":"\n<p>One way to add a Unicode character to Python&#8217;s REPL  is to add it as a string literal.  <\/p>\n\n\n\n<p>Suppose you had the phrase &#8220;My Spanish brown eyed girl.&#8221; <\/p>\n\n\n\n<p>To print the phrase with a Jerusalem cross between each word you would find on the internet a Unicode character reference that gives you the number sequence in this case, U+2629.<\/p>\n\n\n\n<p>Since join method accepts one argument lets first place our sentence in a variable.<\/p>\n\n\n\n<p><code>my_girl = 'My', 'Spanish', 'brown', 'eyed', 'girl.'<\/code><\/p>\n\n\n\n<p><code>print('\\u2629'.join('My Spanish brown eyed girl.'))<\/code><\/p>\n\n\n\n<p>This will output the following:<\/p>\n\n\n\n<p><code>My\u2629Spanish\u2629brown\u2629eyed\u2629girl.<\/code><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One way to add a Unicode character to Python&#8217;s REPL is to add it as a string literal. Suppose you had the phrase &#8220;My Spanish brown eyed girl.&#8221; To print the phrase with a Jerusalem cross between each word you would find on the internet a Unicode character reference that gives you the number sequence &hellip; <a href=\"https:\/\/donaldfcooley.info\/?p=182\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Adding unicode characters to python repl<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/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-182","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":3,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donaldfcooley.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}