Code
Diff
  • hello = 'hello'
    world = 'world'
    print(f'{hello} {world}')
    • print("%s %s" % ("hello", "world"))
    • hello = 'hello'
    • world = 'world'
    • print(f'{hello} {world}')

This is a simple challenge. Given an encrypted sentence, decrypt that sentence.

Only alphabetical characters are included, except for spaces. Spaces are not altered.

def cipher_breaker(string: str):
    final_list = []
    for each in string:
        if each != " ":
            each = chr(123 - (ord(each) - 96))
        final_list.append(each)
    return "".join(final_list)