I have a file I wanna run through in a loop. My file looks something like this: 

```
Hello Hello
A B C D
A B C D
B C D A
B C D A
C D A B
B C D A

Hello Bye
A C D B
C D A B
A C D B
D C A B

```

and I run a loop only through Bye, to blank line.

It should return:

```
 {(A, C, D, B): 2, (C, D, A, b):1, (D, C, A, B):1}

```

And is there a way i can call 'all' which would add all the permutations?

I want to do this without using any import.

So far my function looks like this:

```
# input_word = Hello or Bye
def file_to_dict (file, input_word):
    new_dict = {}
    new_list = []

    flag = False
    for line in f:
        if 'Hello' in line:
            continue
        if not line.strip():
            continue
        lElts = tuple(line.split(' '))
        if lElts in dRet:
            dRet[lElts] += 1
        else:
            dRet[lElts] = 1
    return dRet

```

Is there an alternative for continue?

And now this gives me an error saying:

```
ValueError: I/O operation on closed file

```