1.1 Concept of the frameworkThe framework is actually a collection of reusable code, the framework code is the framework of the Code, not the business logic code, framework code protection class. Methods. Functions and so on, the framework code is
Using regular expressions Those basic theories also say a lot about it now start to practice (don't know why especially like the word ...). The last lesson said that the regular expression is also a language, he was integrated into the python, and
The meaning and characteristic of the regular expression the regular expression is a logical formula for the manipulation of strings, that is, a "rule string" that is used to express a filter logic for a string by using a predefined set of
A variable is a "container" for storing information.Defines the syntax for a variable:$ variable name = value;Examples of using variables:RunAs you can see from this example, the variable name starts with $ and indicates that it is a variable. The
Application scenario: Returns a JSON-formatted list data on the server, with JS being used in the front-end page to draw the DOM1, according to the HTML template to replace the data part of the implementation modeHTML templatesTemplates -Divstyle=
1. Reading filesMethod: All_the_text = open (' Thefile.txt '). Read () But in order to be safe or to give a name to the open file object, so that after completion can be quickly turned off, to prevent useless file objects occupy memory;Example: file_
Using single quotes instead of double quotation marks to contain strings can be faster. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as
When writing Java code, often encounter the situation is the input is wrong to do? Most of the thinking is to use an if judgment, but if you judge it, we can not let the user input again, because the IF statement program will exit the program
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
Using single quotes instead of double quotation marks to contain strings can be faster. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as
1. Constants: All uppercase, unchanged variables2..PYC file: Is the py file compiled after the binary file, the py file becomes the PYc file, the speed of loading increased, and PYC is a cross-platform bytecode, is executed by Python virtual machine.
JavaScript string Common operations Summary, JS String Operations Daquan C # string and regular expression reference manual PDF ebookDownload NowThe manipulation of strings is very frequent and important in JS. In the past after reading the book can
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
JavaScript Classic ExampleFirst, validation Class 1, digital verification within 1.1 integers1.2 Integer greater than 0 (authentication for incoming ID) 1.3 Validation of a negative integer 1.4 integer cannot be greater than IMAX 1.5 integer cannot
1. String length
#strlen (str) # string length function nameStr= ' Apples ' # assigns the string "apples" to the variable strPrint (len (str)) # Prints the length of the string
2. Find characters
#strchr (STR1,STR2) # Find character function
Self-taught for a while Python, it may be my learning posture is not quite right. It's always a sense that Python prefers web development over shell and Perl. The operation and management of Linux is weak.
Aside from this kind of Python-developed
Python has five data types, namely: You can view data types using the type built-in function
1:str (String) 2:int (integer) 3:float (floating-point)
3:list (list) 4:dict (dictionary) 5:set (collection)
STR (string) is an immutable type: Each
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.