I'm trying to store the last character of a string in a variable without knowing beforehand how long the string is (the string is originally read from a list). I have:

```
last = record[-1]
lastInd = len(last) - 1
lastChar = last[lastInd]

```

But I get the following error:

```
lastChar = last[lastInd]
IndexError: string index out of range

```

If I try:

```
lastChar = last[-1]

```

I get the same error:

```
lastChar = last[-1]
IndexError: string index out of range

```

I don't really understand what's going wrong here? Am I not getting the index right?