I have a issue with python.
I make a simple list:
>>> my_list = [\"one\",\"two\",\"three\"]
I want create a \"single line code
When you perform
>>> [(i) for i in my_list if i=="two"]
i is iterated through the list my_list. As the list comprehension finishes evaluation, i is assigned to the last item in iteration, which is "three".
i
my_list
"three"