I have a list:

```
names = ['Jim','Billy','Diana']

```

I have a file where each line is:

```
Jim and Billy went to see Diana.
Diana was at the Mall.
Billy and Diana are siblings.

```

I need the output file to look like:

```
'Jim', 'Billy', 'Diana'
'Diana'
'Billy', 'Diana'

```

Here's what I've got that doesn't work:

```
f = open("storyfile.txt","r")
names = ['Jim','Billy','Diana']
for line in f:
  if names in line:
    print(names)
f.close()

```

This returns:

```
TypeError: 'in <string>' requires string as left operand, not list

```

Not sure what I could be doing differently.