It means “Rust compiler, infer what type goes into the Vec“. And it is indeed analogous to the unused variable in Python (and in Rust itself), in that it represents a placeholder for a type, like it can represent a placeholder for a variable name.
You can find an explanation in The Rust Programming Language chapter about iterator consumers:
Using a _ will let you provide a partial hint:
let one_to_one_hundred = (1..101).collect::<Vec<_>>();This says
“Collect into aVec<T>, please, but infer what theTis for me.”_is
sometimes called a “type placeholder” for this reason.