The throwaway name _
`_` is an ordinary variable name that, by convention, means "this value needs a place to go, but I won't use it".
Used in 27 lessons of the course, from 01.01.
In Python, _ is a valid name like any other. It has no magic in a script: it stores the value you assign to it. What is special is the convention: whoever reads your code understands that the value doesn't matter.
You use it when an expression returns something you don't need. For example, in a for loop where you only want to repeat, or when unpacking a tuple and ignoring one part.
_ = 10
In the course you will see _ = fake.invoke(...). The call does its work (for example, recording a run with run_name and tags) and returns a result. Since that lesson doesn't use it, you assign it to _. That shows you are ignoring it on purpose, not by accident.
Because _ is still a variable, assigning to it again replaces the previous value.
Reach for it when: a call or an unpacking gives you a value you won't use, and you want it to be clear that you are ignoring it on purpose.
Examples
Common mistake
_ = "importante" _ = 42 print(_)
Why: `_` is a normal variable. Assigning it again loses the previous value. If you really need it, it isn't throwaway.
How to write it: If you will use the value later, store it under a descriptive name, like message.
