Python Learning notes----01, Python Installation

Python installationWindows 1234567 1、下载安装包    https://www.python.org/downloads/2、安装    默认安装路径:C:\python273、配置环境变量    【右键计算机】--》【属性】--》【高级系统设置】--》【高级】--》【环境变量】--》【在第二个内容框中找到 变量名为Path 的一行,双击】 --> 【Python安装目录追加到变值值中,用 ; 分割】    如:原来的值;C:

Python crawler index out of bounds

When using BeautifulSoup for location extraction, the index is used because the data is a list, but it is often suggested that the index is out of bounds, this is actually when we match, too careless,AboveNote TD and TR,TR said is the line, TD is

"Python" Scientific Computing Special _ Scientific Drawing Library matplotlib learning (bottom)

Basic reading of CSV file and drawing pie chartSince there is no prior experience of actual processing, this procedure is still worth seeing, involving the basic methods of working with tabular data:Import Matplotlib.pyplot as Pltimport pandas as pd#

Python Learning record (i)

First, the background of the premise (can be ignored)Last year in the app track, because to use the trajectory data file (actually is the location of the latitude and longitude of the collection) on the mock tool to play back, but to generate

Python Learning notes (i)

Because of the work needs, often need to sina a blog to find information, in the Post directory of a page to the naked eye search, see the right title and then click on the link to see the content, know the appropriate copy down. It's annoying. So

Python 2 map () reduce ()

Using the map () function, the nonstandard English name entered by the user becomes the first letter capitalized, and the other lowercase canonical names. Input: [' Adam ', ' Lisa ', ' Bart '], output: [' Adam ', ' Lisa ', ' Bart '].1 def CG (name):

Basic Python Learning (vi)

List understandingA common application is to make a new list where each element is the result of a number of actions that are applied to each member or iteration of another sequence, or create a new list that satisfies the criteria for those

Python Multithreading & Process

One, Thread & processFor the operating system, a task is a process, such as open a browser is to start a browser process, open a notepad started a Notepad process, open two Notepad started the two Notepad process, open a word started a word process.

Random functions in Python

1 #Random function2 ImportRandom#Import Random3 #Verification code for random characters and numbers4 #(65-90) The corresponding Acill code corresponds to a-Z character.5temp=""6 forIinchRange (0,5):#randomly generate 5-bit verification

Python Learning (first article)

Description: The version used by the author is python3.6First, let's talk about Python's three format output. The first one uses the format operator%, and when formatting the string, Python uses a string as the template. There are formatting

Selenium automated combat-based on Python language (ii: Scripting)

The previous article talked about displaying wait and implicit wait statements, and we continue to learn the following command methods.8. Positioning a group of elementsHere is the book itself wrote a page code, by visiting the local page for

Python Learning notes (i)

Previously, I learned about C + +, after the first contact with Python, there is a similar concept of hate, recently began to contact Python, is reading a concise Python tutorial, encountered Python's own grammatical characteristics. indentation in

Basic learning of Python (iii)

The "" "function annotation is the optional metadata part of the function definition Annotations are stored in the __annotations__ property as a dictionary and do not have any effect on the function itself, parameter annotations are defined by

Basic Python Learning (iii) four

Learn about List:"" "More on Lists?Using Lists as Stacks."""Fruits = [' orange ', ' apple ', ' pear ', ' banana ', ' kiwi ', ' apple ', ' banana ']#Return the number of times X appears in the listPrint (Fruits.count (' apple '))Print (Fruits.count ('

A brief introduction to the Python random module

The random module in Python is used to generate random numbers, and we can use him to randomly generate digits and strings.Random.randint (b) : A random integer in A to B650) this.width=650; "Src="

Python's post login test

Not explained, directly on the code:1 #!/usr/bin/env python2 #-*-encoding:utf-8-*-3 4 """ 5 @version: v1.06 @author: Elijahxb7 @OS: Linux8 @contact: [email protected]9 @site: Http://www.cnblogs.com/elijahxbTen @software: pycharm Community Edition

viewing ports via Python script

[email protected] alertscripts]# cat check_port1.py #!/usr/bin/env python #coding: utf-8 import OS, JSON Port_list=[] port_dict={"data": None} cmd= "" Ss-tnlp|egrep-i "$" |awk {' Print $4 '}|awk-f ': ' {if ($NF ~/^[ 0-9]*$/) Print $NF} ' |

Python module knowledge points to know

For an outline, refer to the blog: http://www.cnblogs.com/yuanchenqi/articles/6766020.html1. In the regular expression (re module),. Represents any symbol except a newline character, but if you add re. S can match all symbols.import

Common modules of Python Basics (iii)

1.configparser ModuleThis module is used to read and write files, for files that are similar in format to Windows INI files, and can contain one or more sections (section), each of which can have multiple parameters (key-value pairs)The format of

Use python to crawl articles from the prose network,

Use python to crawl articles from the prose network,Image.png Configure the python 2.7 bs4 requests Install sudo pip with pip install bs4 Sudo pip install requests This section briefly describes how to use bs4 because it crawls a webpage, so

Total Pages: 4013 1 .... 3709 3710 3711 3712 3713 .... 4013 Go to: GO

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.