I am a novice at Python. I am trying to use the output of 2 functions as the start and end values of a slice() method. 

```
file=open("../dataFiles/mbox-short.txt", mode='r')
line=file.readline()

def firstposition ():
    return int(line.find("@"))

def secondposition ():
    return int(line.find(" ", firstposition))

while line != "":
    i=line[firstposition:secondposition]
    print(i)
    line = file.readline()

file.close()

```

I get the following error from PyLab:

```
Syntax error line 19: 
i=line[firstposition:secondposition]
TypeError:
slice indices must be integers or None or have an __index__ method

```

If the functions are returning integers, why will the slice not accept them? The .txt file used contains lines with words and an email address, with the goal being to index the start and finish of every domain.