For ITEM in list == what is the point of ITEM?


#1


Hi guys,
I am very new to coding, and working through section 10. trying to understand what I am doing.
Although I am finding it easy, I don't understand the point of calling an ITEM from a LIST.

So for example in one of the examples

"""a = ["List of some sort”]
for x in a:
# Do something for every x """

However I don't understand what the point of calling something x is, when it seems irrelevant to the outcome.

Sorry I hope this isn't a really silly questions, but I am yet to see the point of the list name in this function.

Thanks guys!


#2

a is a defined object in outer scope. x is a local variable in block scope that acts as a placeholder for the list elements, each in turn. x represents a value.