Open to Pycharm Create the Web2py Project following:As shown above:Application Name:main represents the application created by the main stationUse local web2py: can be developed using the source code of the web2py you downloadBy default, WEB2PY will
There are character formatting methods in most programming languages, which are summarized in the Python language for easy reference:Way 1:100 Semicolon%
Format
Describe
%c
Characters and ASCII codes
Why to add header information, because sometimes some pages will have anti-crawler settings, resulting in the inability to get a normal web page, here, in the head of the code to add a headers information, simulated into a browser to visit the Web
Data type
Numbers (number) int-signed integer/long-long integer/float-float/complex-Complex
String (String)
List (lists) []
Tuple (tuple) ()
Dictionary (dictionary) {}
Data type conversionsNumber: Int (x), Long (x),
Python Idle: Select Code, ALT+3 Group comments, alt+4 group uncomment, ctrl+[or CTRL +] collective indentation.If orange, keywords. Do not forget the colon at the end of a line:There is no statement, put a pass placeholder, or no answer will be
Conditional Statement if ElseLoop statement while forBreak of the Loop continue The break statement terminates the Loop statement, that is, the loop condition does not have a false condition, or the sequence is not fully recursive, and the loop
Advanced FeaturesGeneratorThere are two ways to read generator elements :? G.next ()? for Loop read ; ( The generator is essentially an iterative object );? List-generated ( list generation is a very simple and powerful built-in Python build that
1. Create a new plugin (Tools---Developer---new Plugin) to write the following and save as head.pyimport Sublime, Sublime_pluginimport datetimeclassPyheadcommand (Sublime_plugin. Textcommand): def run (self, edit): Self.view.run_command
Bubble sort
Basic ideas
The bubbling method is also called the Sink method, which does not have adjacent two record keywords compared to the size, large records toward sinking (can also small on-line float). Each time the last sinking
SYS.ARGV parameters "argv" is a shorthand form of "argument variable" parametric variable. It is generally passed to the program by the system at the command line invocation. This variable is actually a list, argv[0] is usually called "script file
In the case of idle use:Open Idle and click "File", "New file" in the menu bar.In the new file, save it. Right-click the file, open with, select Python idle open.After the code is finished, press F5 to run.In which to output a, also need to put in
Concept of 024 module and 024 Module
### ModuleCalculate is self-written and can be called if it is red.
Import calculate # Find calculate in the search path. after py, set calculate = calculate. py (all code) print (calculate. add () from calculate
Numpy module: numpyrandom
Numpy module learning:
Three URLs are recommended:
1 http://blog.csdn.net/yhb315279058/article/details/50226075
2 http://www.jb51.net/article/49397.htm
3 http://www.jb51.net/article/103080.htm
How to Learn the Random module
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