ステートメント
notで aを使用できないのはなぜですか? と の両方が反復可能であるとfor仮定しますobjectlistそれができない場合、別の方法はありますか?
以下に例を示しますが、「明らかに」構文エラーです。
tree = ["Wood", "Plank", "Apples", "Monkey"]
plant = ["Flower", "Plank", "Rose"]
for plant not in tree:
# Do something
pass
else:
# Do other stuff
pass