This article is referenced from the basic Python Tutorial (second edition)
Operation
Grammar
Example
Results
Find sub-string
find ("str") 1. Returns the leftmost index where the
1The quotes are all strings: Name= ' a ', name="a"2String multiplication: n1= ' a ', n2=n1*10 means a repeats 10 times3Ifelif Else4N1=input ('Please enter your school number.')5 Please enter your study number
#This example is a separate processing of file exceptions and type exceptionsTry: Sum= 1+'1'F=open ('Wo.txt') Print(F.read ()) F.close ()exceptOSError as Reason:Print('file Error, error reason:'+str (reason))exceptTypeError as Reason:Print('type
The first is to give the two functions for pixel points in the following article, the use of GetPixel and PutpixelHttps://www.cnblogs.com/kongzhagen/p/6295925.html16 Image Type conversions:im = Im.convert ("RGBA")17 Gets the value of a pixel
Welcome to follow Me blog: Cloud DreamerDescribeThe Find () method detects whether the string contains substrings of STR, and if you specify beg (start) and end (end) ranges, the check is included in the specified range, and if the specified range
Arithmetic topic generation-Console basedProject hosted in the code cloud: airline TicketsDemand analysis
According to the console prompt information, enter the topic to generate the relevant configuration parameters
Number of
Pip:Is the official Python-Recommended package management toolIf you want to see what functions a module provides, you can go to the Python console and import the module and use the Help module to see what the module>>>help (module name)>>>help
A. Demand analysis1. The teacher randomly generates natural numbers, true fractions, false fractions, and arithmetic with parentheses of less than 3 operators by software and publishes them to students in a file format.2. After the students have
Formatting the string1, String.capwords ()Turns the first letter of all the words in the string into uppercase letters. See Example:>>> a='Tom was a boy and Kate was a girl. ' Import string>>> b=string.capwords (a)>>> b'Tom was a boy and Kate are A
1. What is an iterator?
Iterators are a repeating process, and each repetition is the result of an opportunity's last
Want to know exactly what an iterator is? You must first understand the concept of what is an iterative object?
Welcome to follow Me blog: Cloud DreamerDescribeThe Python Dictionary SetDefault () method is similar to the Get () method, and if the key does not already exist in the dictionary, the key is added and the value is set to the default
= = = 9 = = = 50022= noWith one of the above configuration documents, he is required to read, and delete and modify the operation.#@File: 4.9configparser module. PY#@Software: PycharmImportconfigparserconf=Configparser. Configparser () Conf.read
1. Find labels by name and attributesAs before, grab the entire page and create a BeautifulSoup object. This "lxml" parser needs to be downloaded separately.PIP3 Install lxml>>> from urllib.request import urlopen>>> from BS4 import beautifulsoup>>>
This is my personal sublime text3 python configuration scheme (the method is from the Internet, some from the official website). Every configuration I will try to give the source.
Package Control FirstSublime Text 3 Install the package
The low-level tutorials for crawling girls ' nets are connected as follows: [Climbing sister net] (68958267)PS: Support only a single set of diagram download, does not support the overall downloadTalking about my design idea of this reptile code:①
This article mainly for you in detail the Python dataframe implementation of Excel merged cells, with a certain reference value, interested in small partners can refer to
In the work often encountered the need to export data to Excel, and need to
Chat bot (bot) is a kind of practical interactive Chat Service mode like Slack. If you've never built a chat bot before, then this article provides a simple getting Started guide to how to build your first chat bot with Python in conjunction with
This article mainly and everyone to share the Python implementation of the method of management site, mainly in code and we explain the way, hope to help everyone.
One, Django Admin page
Django has a built-in admin page that you can use only with
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