You can use anything that doesn’t start with a digit or punctuation as a variable name (underscore beginning also allowed) unless it’s a keyword.
- 0 Posts
- 2 Comments
Joined 7 months ago
Cake day: November 14th, 2024
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Underscore alone is a special variable name and I’m pretty sure anything assigned to it goes straight to garbage collection. Whereas
_myvariable
is typically use to indicate a “private” class variable or method (Python doesn’t have private so it’s just a convention).