diff options
| author | jerome <jerome@xlinfo.fr> | 2024-09-10 03:24:13 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2024-09-10 03:24:13 +0200 |
| commit | 2173ed5fe5e5a55d0f0148011ba6fb460295fdd7 (patch) | |
| tree | b3c40ebe982115e16b498c07473c530d9b14950a /cesar.py | |
| parent | 075b82f4363ca80dac8a2ac7d66cde9050e2a155 (diff) | |
| download | python-2173ed5fe5e5a55d0f0148011ba6fb460295fdd7.tar.gz python-2173ed5fe5e5a55d0f0148011ba6fb460295fdd7.zip | |
cesar.py
Diffstat (limited to 'cesar.py')
| -rw-r--r-- | cesar.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,7 @@ -def decalage(lettre,clef): - liste=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] +import string +def decalage(lettre,clef): + liste=list(string.ascii_lowercase)*2 + list(string.ascii_uppercase)*2 if lettre not in liste: return lettre else: |
