В задании говорится, что текст шифруется по следующему принципу: берётся первая буква, слева ставится третья буква, потом пятая и т.д. Таким образом из слова «привет» получается слово «еипрвт». Аналогичным образом шифруется всё предложение.
Пишем очень кривой скрипт для расшифровки:
f = open("text.txt") text = f.read() text = text.replace('.', ' .').replace('\n', '').split(' ') res_text =  def get_norm_word(word, start, space): normal_word = i[start] if space: normal_word += ' ' next_right = start + 1 next_left = start - 1 counter = 1 while counter != len(i): normal_word += i[next_right] if space: normal_word += ' ' counter += 1 if counter == len(i): break normal_word += i[next_left] if space: normal_word += ' ' counter += 1 if counter == len(i): break next_right += 1 next_left -= 1 return normal_word for i in text: if len(i) % 2 == 0: # ch start = int(len(i) / 2 - 1) res_text.append(get_norm_word(i, start, False)) else: start = int(len(i) / 2) res_text.append(get_norm_word(i, start, False)) print (res_text) res =  new_sen =  for i in res_text: if i == '.': res.append(new_sen) new_sen =  else: new_sen.append(i) print('++++++++++++++++++++++++++++++++++++++++') print(res) print('++++++++++++++++++++++++++++++++++++++++') res_text =  for i in res: if len(i) % 2 == 0: # ch start = int(len(i) / 2 - 1) res_text.append(get_norm_word(i, start, True)) else: start = int(len(i) / 2) res_text.append(get_norm_word(i, start, True)) for i in res_text: print (i)
Вроде должно работать. Запускаем, получаем:
the trumpet call had let loose an enormous volume of noise already an excited voice was gabbling from the telescreen but even as it started it was almost drowned by a roar of cheering from outside the news had run round the streets like magic he could hear just enough of what was issuing from the telescreen to realize that it had all happened as he had foreseen a vast seaborne armada had secretly assembled a sudden blow in the enemys rear the white arrow tearing across the tail of the black fragments of triumphant phrases pushed themselves through the din vast strategic manoeuvre perfect coordination utter rout half a million prisoners complete demoralization control of the whole of africa bring the war within measurable distance of its end victory greatest victory in human history victory victory victory under the table winstons feet made convulsive movements he had not stirred from his seat but in his mind he was running swiftly running he was with the crowds outside cheering himself deaf he looked up again at the portrait of big brother the colossus that bestrode the world the rock against which the hordes of asia dashed themselves in vain he thought how ten minutes ago yes only ten minutes there had still been equivocation in his heart as he wondered whether the news from the front would be of victory or defeat ah it was more than a eurasian army that had perished much had changed in him since that first day in the ministry of love but the final indispensable healing change had never happened until this moment the voice from the telescreen was still pouring forth its tale of prisoners and booty and slaughter but the shouting outside had died down a little the waiters were turning back to their work answer to this problem is the word programmer in lower case one of them approached with the gin bottle winston sitting in a blissful dream paid no attention as his glass was filled up he was not running or cheering any longer he was back in the ministry of love with everything forgiven his soul white as snow he was in the public dock confessing everything implicating everybody he was walking down the white tiled corridor with the feeling of walking in sunlight and an armed guard at his back the longhoped for bullet was entering his brain he gazed up at the enormous face forty years it had taken him to learn what kind of smile was hidden beneath the dark moustache o cruel needless misunderstanding o stubborn self willed exile from the loving breast two gin scented tears trickled down the sides of his nose but it was all right everything was all right the struggle was finished he had won the victory over himself he loved big brother
Гуглим оригинал, сравниваем, находим строку (которая по идее и так должна была бросаться в глаза):
answer to this problem is the word programmer in lower case