I have some data in a text file, which is mostly paths of folders

```
home/user/Desktop/arandomname/2017/01
home/user/Desktop/couldbeanothername/2017/01
home/user/Desktop/guesswhatname/2017/01

```

I want to select the string between "Desktop/" and "/2017", I tried using position but definitely won't work since the strings are different in length

Currently I'm using

```
for i in content:
    print i.partition('/')[-1].rpartition('/20')[0]

```

The output is up to

```
home/user/Desktop/arandomname
home/user/Desktop/couldbeanothername
home/user/Desktop/guesswhatname

```

Any suggestion?