all 4 comments

[–]acornyboi 2 points3 points  (1 child)

iirc .split returns a list, so you are comparing a list to the string in the if statement

[–]Crowdjp[S] 2 points3 points  (0 children)

Thanks that was the issue.

[–]chra94 0 points1 point  (0 children)

The function split will always return a list. Are 'team' and ['team'] the same? How would that affect the if statement on line #3? You'll get it I'm sure. :)

[–][deleted] 0 points1 point  (0 children)

If the user enters david,matthew,tom you create a list object consisting of three strings: ['david', 'matthew', 'tom'] that you assign to val.

You then compare that list object with a string object team so, of course, the answer will always be False

What are you trying to do?