The formal name for x
in that context is target
, as illustrated by Python's language reference:
for_stmt ::= "for" target_list "in" expression_list ":" suite
["else" ":" suite]
...with target_list
(and target
) defined as:
target_list ::= target ("," target)* [","]
target ::= identifier
| "(" target_list ")"
| "[" target_list "]"
| attributeref
| subscription
| slicing
| "*" target
If you'd like to know what a target can actually accept or be defined as, feel encouraged to peruse the documentation. By most standard meanings, you're using some kind of simple identifier, like a variable name (in this case, x
) to represent the target.