using underscore in python
Jadi
All programming languages do have some common elements; inputs, functions, outputs, variables, ... . But there are also unique idea in some programming languages and if you want to know about them, you need to specifically study them. This is what makes a person proficient in a specific programming language.
One of these is the usage of underscore ( the _ ) in Python programming. In this video I will show you 7 different usages of this character from a very trivial "digit separator" to a more cool "underscore as a dummy variable" and some more advanced topics like the meaning of name == "main" which you might see in some source codes (and most of the libraries).
Lets start and let's write better code!
00:40 - Underscore to separate digits in long numbers 01:40 - _ is the last result in IDLE 02:49 - underscore as dummy variable 04:52 - _ After python keywords as variable names 06:16 - Underscore before variable as a weak local 07:36 - two underscore before class members 08:45 - Variables with two underscores on both sides, like name ... https://www.youtube.com/watch?v=ZCirxG9jrMo
37601496 Bytes