Why do not use the function you defined by having parameters and return value instead of print? int is better (safer) than eval on user input.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
This is not Lisp however much it is my first love in programming languages, study about defining functions (or procedures, they are same in Python), also study about generators and use join as you have already done to get result.
Input part cannot be counted as part of one liner function, but is part of calling the function like:
encrypted = caesar(original=input("Enter the text to be decrypted: "), shift=int(input("Enter the shift amount: ")))
Notice the descriptive parameter names.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852