<div dir="ltr">just wanted to add how my subconscious wants to solve this if i were doing it:<div><br></div><div>characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"</div><div>character_relation = lambda c,i : characters[(characters.index(c.upper()) + i)%26]</div>
<div><br></div><div><div>>>> character_relation("a",3)</div><div>'D'</div><div>>>> character_relation("a",-2)</div><div>'Y'</div></div><div><br></div><div>anyway... i want to say the talk about encoding and such really gets to the point of how old ascii tricks are somewhat inapplicable to our new unicode world. anyway... fun stuff. </div>
<div><br></div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 10:41 AM, Eric Floehr <span dir="ltr"><<a href="mailto:eric@intellovations.com" target="_blank">eric@intellovations.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
string.uppercase returns a string of all the capital letters in ASCII.<br></blockquote><div><br></div></div><div>string.uppercase is locale-dependent, so while in most locales it will be ASCII, it won't in all locales.</div>
<div><br></div><div>Because of that fact (i.e. a constant that changes :-), string.uppercase (and lowercase and letters) have been removed from Python 3.</div><div><br></div><div>So if you want something that works on Python 2 and 3, you'll need to use ascii_uppercase (or ascii_lowercase or ascii_letters).</div>
<div><br></div><div><br></div></div></div></div>
<br>_______________________________________________<br>
CentralOH mailing list<br>
<a href="mailto:CentralOH@python.org">CentralOH@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/centraloh" target="_blank">https://mail.python.org/mailman/listinfo/centraloh</a><br>
<br></blockquote></div><br></div>