The Student Room Group

A453 Task 3 help please OCR

I have been asked to compress a file with words and the index positions. The list of positions should be converted back into a list of words. my sentence is "Do what you can for your country" This is my code so far any help?

i = open("Task 3.txt", "r":wink:

indexs= i.read()


for f in indexs:
print(f)
(edited 7 years ago)
Reply 1
Have you managed to do this? I'm stuck too :/
So am i someone help
Reply 3
I've finished this; it's not that bad.

If you have finished task 2, a large part of the code should be similar.

I used Pickle in my answer - search that up. It might set you off on the right track :smile:

Quick Reply

Latest