environment windows7 (I want a Mac Book Pro 16inch) Visual Studio Code chrome
This article is written for beginners in programming and Python.
As soon as you start learning Python, look at Progate, dot install, etc. and write code, you will see a series of "???". One of them is that Pro terms and how to write code are Pro, so there are some difficult points for beginners, and if you do not clear them first, the learning speed will not increase (was).
confuse.py
str=str(123456)
print(str)
#=To the left of is the name str (variable name).=To the right of is the name of the str function (like a conversion label).
The str to the right of = is an abbreviation for string, and in Python it is a rule that numbers (called numbers) are converted to characters (called strings) = every memorization. In this neighborhood, it is called the str function. On the other hand, the "str" to the left of = is just a name. It seems that I used the name (variable name) "str" to explain the str function, but I'm afraid this is because some beginners don't know whether it is a function or a variable name. (Are you afraid? Afraid? In any case, I haven't heard the word acorn recently ...)
Let's go next.
confuse.py
for tool_item in tool_items:
#Next to for is the singular. Plural after in.
This can be understood as the learning progresses, but at the beginning it was in a state of "What are you talking about !! ??". If you look closely, "tool_item" is the singular form of the tool item, and "tool_items" is the plural form. The name "tool_items (plural)" is a collection of several tool items, such as "Master! Let's put them together!", And that is "tool_item (singular)". It is a form extracted one by one in the variable.
That's it. I will add it at any time by editing.
Recommended Posts