Python keeps telling me invalid syntax 

```
In [7]:   File "/tmp/ipython-4302iuN.py", line 26
    for n in N:
              ^
SyntaxError: invalid syntax

```

The reason it occurs on line 26 and I don't have 26 lines here is due to the shebang line and comments.

```
L = 80.0                                               
N = 2 ** np.arange(0, 10, dtype = np.float64)
dt = 0.0002
tmax = 10
nmax = int(np.floor(tmax / dt))  #  also try ceil/floor                            

deltax = []
error = []
u = 2. * (2. / (np.exp(x + 20.) + np.exp(-x - 20.)) ** 2

for n in N:
    dx = L / n

```

I have tried using range with integers as a test. I opened a separate ipython and ran 

```
for n in range(1, 2):
    dx = 10 / n

```

which worked just fine. 

What is wrong with the syntax?

I have closed python and re-opened but that didn't help either.