summaryrefslogtreecommitdiff
path: root/cesar.py
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2024-09-10 03:24:13 +0200
committerjerome <jerome@xlinfo.fr>2024-09-10 03:24:13 +0200
commit2173ed5fe5e5a55d0f0148011ba6fb460295fdd7 (patch)
treeb3c40ebe982115e16b498c07473c530d9b14950a /cesar.py
parent075b82f4363ca80dac8a2ac7d66cde9050e2a155 (diff)
downloadpython-2173ed5fe5e5a55d0f0148011ba6fb460295fdd7.tar.gz
python-2173ed5fe5e5a55d0f0148011ba6fb460295fdd7.zip
cesar.py
Diffstat (limited to 'cesar.py')
-rw-r--r--cesar.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cesar.py b/cesar.py
index e9381d7..15d7ce2 100644
--- a/cesar.py
+++ b/cesar.py
@@ -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: