One: Input of the file:In the previous Python basic command, we have introduced the input, in this case several examples explain the difference between the twoThe Raw_input () function reads a line from the standard input and returns a string (minus
The 5th chapter exercises the following contentSimple IF-judgment statementDetermine whether the strings are equal or unequalCompare the size of a numberAnd,or comparisonChecks whether the specified element exists in the listIf,if-else,if-elif-else
1. InstallationAddress: https://www.python.org/downloads/windows/After the installation is complete, configure the environment variables, such as: path after the Count ; C:\Python27(may need to be restarted)Then cmd enters Python, which is shown
Practice content includesCreate and access a listIndex of the listUse each value in the listModifying elements in a listAdd an element to the list append ()Insert an element into the list insert ()Remove an element from the list Del,pop ()Remove an
Installing a third-party library appears Python version 2.7 required, which is not found in the registryCreate a file register.py content as follows. Then execute the script.#-*-Coding:utf-8-*-"" "Created on Wed Sep 16:21:50 2017@author:admin" ""
from Import *fillcolor ("red") Begin_fill ()for in Range (5): Up () goto (0,-20*i) down () Circle (20*i) End_fill () First, Concentric circleSecond, the sun flower from Import *color ('red','yellow') begin_ Fill () while True: forward
1 Local A function defines a local scope; The F_local property in Pyframeobject 2 GlobalA module defines aGlobalscope; The F_global property in Pyframeobject.3 BuiltIn Open, dir's scope, and so on, Python's top-level scope4
Python Shopping Cart
Demand
The user name and password are stored in the file in the following format: xxx|xxx
Start the program, log in first, log in successfully let the user enter the salary, and then print the product
Demand
Enter a string of characters
If you encounter lowercase or uppercase letters, convert, A--Z,B--Y,C--X, uppercase letters are also
If it is a different character, output it as-is
Judgment logic
1. polymorphic2. Static methods3. Class methods4. Attribute methods5. The origin of the class6. Reflection7. Exception Handling8.Socket CommunicationWhen the class needs to inherit two, and the arguments for each class are differentyou need to
Module:Pip Install module nameMounting moduleImport module from collections import NamedtupleCollections module:Several additional data types are available:Counter, Deque, Defaultdict, namedtuple\ordereddict1.namedtuple: Generate a tuple that can
Now that we know how to start and exit the Python interactive environment, we can formally start writing Python code.Before you write your code, do not use copy-paste to paste the code from the page onto your own computer. Write a program also pay
Name space Namespace namespace is a very central concept for Python, and the entire Python virtual machine runs in a very close connection to the namespace concept. From the ' assignment ', the assignment statements in Python are a special
This article mainly introduces Python using struct processing binary instance of the relevant information, hope that through this article you can master this part of the content, the need for friends can refer to the next
Python uses struct to
This article mainly for you in detail the Python processing Excel related data, xlrd simple use, with a certain reference value, interested in small partners can refer to
XLRD is mainly used to read Excel files, this article for everyone to share
Pygame in common Python modules (Manual: home page), pythonpygame
Pygame manual Official Website:Http://www.pygame.org/docs/
Pygame Homepage
Instructions:
Self-Report
The basic information about Pygame, what is it, who
PIL and pythonpil in common Python modules
Official Website:Http://www.pythonware.com/products/pil/index.htm
Python Imaging Library (PIL)
The Python Image Library (PIL) adds the image processing function to your Python interpreter. This library
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