Rookie Python Study Notes Day 1: python Study Notes on the use of some function libraries

Source: Internet
Author: User
Tags network function

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.