Environment:Win7 32-bit systemPython3.6 (32bit)Installation module:Cx_oracle module Download (: https://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_oracle)If it is downloaded on the website, it is necessary to download and the Python version corresponds .
#-*-Coding:utf-8-*-Import PygameFrom pygame.locals Import *Import time‘‘‘Description1. Press the B key to let the player plane explode2. The principle of explosion effect is: change the picture‘‘‘Class Hero (object):def __init__ (self,
File processing: File processing includes reading files, writing filesRead the file:1. Open File2. Read the file3. Close the fileWrite file:1. Open File2. Write as File3. Close the fileWhether to read files or write files, you need to open the file,
ObjectivePython, is an object-oriented interpretation of computer programming language, is purely free software, Python simple and clear syntax, features are forced to use whitespace as a statement indentation, with a rich and powerful library, it
GitHub Address: Https://github.com/cheesezh/python_design_patternsAdapter modeAdapter mode, which transforms the interface of a class into another interface that the customer wants. The adapter mode makes it possible to work with those classes that
1. Supplement to the underlying data type 1. tuplesIf there is only one data in the tuple, and there is no comma, then the ' tuple ' is the same as the type of the data inside. Such as:1Tu = (1)2TU1 = (1,)3TU2 = ('Alex')4TU3 = ([a],)5 Print(Tu,type (
1. Open File:Open functionThe most common use of the Open function is as follows: File handle = Open (' File path ', ' mode ', encoding method). Encode= "1. About file paths#文件路径:There are two main types, one is to use relative paths, and the above
Python3 Basic SyntaxEncoding--By default, the Python3 source file is encoded in Utf-8 and all strings are Unicode stringsPython Reserved words-keywordskeyword, we can't use them as any identifier name, Python's standard library provides a keyword
Data persistence: Data persistence is the general designation of converting in-memory objects into storage models, and converting storage models to objects in memory. An object can be any data structure or object model, and the storage model can be
1 questionsWhen we have two or even multiple projects A, B, C ..., the Python runtime environment for each project's operational requirements is different. By default, regardless of the project, the global Python environment is used. In this case,
Several random function usages in the random module.Introduce the Random module:1 Import Random1.random.random ()This function is used to generate a random floating-point number from 0 to 1:0 1 Print (Random.random ()) 2 Print (Random.random ())0.450
One: string deletion1, the string itself is immutable, a string definition, after he is not able to do anything, so the addition and deletion is the copy of the original string copy of the operation, the original string is the original string, it
1 #1. Open File2 3 #relative path, relative to which directory under which the specified file4 #f = open ("A.txt", "r+")5 #6 ## 2. Read and write operations7 #content = F.read ()8 #Print (content)9 # #Ten #f.write ("88888") One # A # - ## 3. Close
1. SYS moduleThe SYS module includes a very useful set of services, including a number of function methods and variables, to handle Python runtime configuration and resources so that it can interact with system environments outside of the previous
A block of codeWhat is a code block???Python programs are constructed from blocks of code. Let me give you an example:1 for inch ' 12334567 ' : 2 Print (i)1 def func (): 2 Print ('hello,world! ')1 class A: 2 ' Colin 'The above example
1, where the format_string type of time and struct_time between can be converted, timestamp time stamp can be converted between struct_time, but time stamp and format time is not directly converted.The functions that the time module contains include
Tag: Indicates the system is not stored and Python opens the simplified English alphabetPython Coding knowledge
Coding Introduction
Kinds
Storage units
1. Introduction to CodingEncoding is the process of converting information
%s string
string="Hello"
#%s The result is hello when printing
print "string=%s"% string # Output:string=hello
#%2s means that the string length is 2, and when the original string is longer than 2 o'clock, it is printed at the
Python Learning Route
Reference to a lot of Daniel's blog, a lot of answers, think carefully after the temporary planning of the following routes
1.Python Full Stack Road
2.Python Project Combat
3
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