I want to read class object from a text file and then put it on a list. I get:activities.append(Activites(i[0], time[0], time[1], i[1]))
IndexError: list index out of range.
I dont want to specify a range because I want to be able to add activites in the list, how do I solve this problem?

textfile:

```
Activity # Time # Location
Football # 8-9 # Pitch
Basketball # 9-10 # Gym
Lunch # 11-12 # Home
Reading # 13-14 # Library

```

My Code:

```
class Activites:
    def __init__(self, name,startTime, endTime, location):
        self.name = name
        self.startTime = int(startTime)
        self.endTime = int(endTime)
        self.location = location

def filee_():
    activities = []
    f = open('text.txt', 'r').readlines()
    for i in f:
        i=i.split('#')
        time = i[1].split("-")
        activities.append(Activites(i[0], time[0], time[1], i[1]))
    return activities

```