Implement the Python function specified below. Return ONLY the indented function body, without repeating the…
Implement the Python function specified below. Return ONLY the indented function body, without repeating the…: a task in unslop-harbor (Harbor dataset). def encode shift(s: str): """ returns encoded string by shifting every character by 5 in the alphabet. """ return "".join( chr(((ord(ch) + 5 -…
The task
def encode_shift(s: str): """ returns encoded string by shifting every character by 5 in the alphabet. """ return "".join([chr(((ord(ch) + 5 - ord("a")) % 26) + ord("a")) for ch in s])
Part of rawmodels/unslop-harbor.