Skip to content

Instantly share code, notes, and snippets.

@Carioca-zz
Carioca-zz / caesar.py
Created June 29, 2018 18:31
Python Caesar Cypher
from string import ascii_lowercase as al, ascii_uppercase as au
def caesar(n):
'''Returns a Caesar Cypher function that shifts by n'''
def rotate_char(c, n):
if c in al:
return al[(al.index(c) + n) % len(al)]
elif c in au:
return au[(au.index(c) + n) % len(au)]
return c

Keybase proof

I hereby claim:

To claim this, I am signing this object:

sed 's/(.*\.mp3)$/podcast.\1/' < nome_do_arquivo.txt