Decipher this!
Защо на задача Decipher this! (от Python Fundamentals) ми дава 60/100 в Judge ?
Eто кода: https://pastebin.com/cXSFdBG5
Защо на задача Decipher this! (от Python Fundamentals) ми дава 60/100 в Judge ?
Eто кода: https://pastebin.com/cXSFdBG5
message = input().split(' ')
deciphered = []
for word in message:
ascii_char = [char for char in word if char.isdigit()]
word_list = [char for char in word if char not in ascii_char]
first_letter = chr(int(''.join(ascii_char)))
word_list[0], word_list[-1] = word_list[-1], word_list[0]
new_word = first_letter + ''.join(word_list)
deciphered.append(new_word)
print(' '.join(deciphered))
Доста забавна задачка. Това е най-краткото решение, което успях да измисля.
Oh my goodness, you get to witness incredible stuff. Long tunnel rides will leave you with lasting memories. build now gg