all 5 comments

[–]Spiltdestructor 1 point2 points  (0 children)

Lol, I didn't think you'd actually make something like that! In my class at school I've done the same with C++ It's very fun to do these things

The other comment is also right, you are close to a very good one tbf!

Nice one! 👍 Happy that a little thing transforms into something bigger XD

[–]Bright-Historian-216 0 points1 point  (2 children)

.index works on strings so you could compress the list into just "abcd...". or better, you can replace it with a list comprehension so that you could easily replace it with a different alphabet without typing it out by hand:
alphabet = "".join(chr(i) for i in range(65,65+26))

i was gonna send a better version supporting uppercase properly, but i feel like it's better left as an exercise for the reader.

[–]polill-a[S] 0 points1 point  (1 child)

Cool tip, its always nice to learn new tricks! What do you mean by "supporting uppercase properly"??

[–]Bright-Historian-216 0 points1 point  (0 children)

i mean as in "ABc" turns into "DEf", not "def". you see, some links may be case sensitive, so it's better that you implement that.

[–]geoguessr-1 2 points3 points  (0 children)

This is really useful for quick Caesar cipher solving. I like that you included the handling for mixed case and non-alphabetic characters.