Rookie Python Study Notes Day 1: python Study Notes on the use of some function libraries
Tuesday, January 3, 2017
It is really difficult for freshman to learn a new computer language. Sometimes I can even check the spelling error of a function for half a day. No way. Who makes my English too bad.
I think it is better to learn computer languages from the C language. Python has many advantages and discards the complexity of the basic language.
Day 1: function usage
Like C, python has its own integrated function library, which we use .. Like a string function (you can use help (str) for viewing ):
There will be a lot of descriptions. As a newbie, I don't even know what it is, but when I go down, I can find many functions.
Many functions are introduced in English, which is hard to understand. At this time, the strength of Baidu is shown. The last decode of Baidu.
You can find the instructions and usage. We will not care about how to use them first, and we will go to the next library function.
OS library functions.
Like before, we first use help (OS)
However, an error is reported.
Because string functions are introduced by default, but the OS library functions are not, we first introduce
Import OS
Then proceed to help (OS)
All right, English is hard, but I see
Baidu's last OS. close.
This is easy to understand.
What do you mean by Baidu.
There are also other library functions. Such as the network function library, must be introduced first, in use.
Today, instead of talking about function libraries, we are talking about help (). This command is very powerful, especially a little white. You must learn to ask.
Finally, let's talk about the location of the function library!
You can help () A library function.
That is, in the lib folder where you install python.
When other library functions are introduced, you can also put them in lib and use import to introduce them.
-------------------- Xiao Bai learns his diary to cheer for the electronic dream.