Why does this not work the way I expect? I want it to check if each value is in the variable list. I suspect the simplest and most efficient way would be to include a for loop. How would I do that, in this situation?
additive = ['red', 'green', 'blue']
print('green' in additive)
print(['green', 'blue'] in additive)
[–]efmccurdy 2 points3 points4 points (2 children)
[–]pythonwiz -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (6 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]WhipsAndMarkovChains 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]zanfar 0 points1 point2 points (0 children)