Both input and raw_input can be used to read the input from the console, but the input and raw_input are different in processing numbers.Pure numeric Input
When the input is a pure number
Input returns numeric values, such as int and float.
Import typesaaa = 0 print type (AAA) If type (AAA) is types. inttype: Print "the type of AAA is int" If isinstance (AAA, INT): Print "the type of AAA is int" BBB = 'hello' print type (BBB) if type (BBB) is types. stringtype: Print "the type of BBB
Concise Python tutorial --- 3. Sharpen the knife without mistake
Hello World
Enter "Python" in the command line and press enter to enter the python command line interaction interface. On this command line interface, you can enter the
Related tool code deployment
SAE python uses SVN as the deployment tool. To deploy code to SAES using SVN, follow these rules:
Only directories named after positive integers are allowed under the svn root directory, and files are not allowed.
Http://blog.sina.com.cn/s/blog_708be8850101bb04.html
1. What is pickle? What are the advantages of pickle?
Python ships with a standard library called pickle, which can save and load almost any Python data object, including lists.Once you pickle
Http://hi.baidu.com/lx58732553/item/a24ef01ee19fc2737b5f2586
These days, we need to randomly extract a few numbers from the heap, So we re-studied the random module.
The following describes common functions in random.
Prerequisites: You need to
1. When the get method is used, the URL format is similar to the following:
[HTML]Index. jsp? Id = 100 & OP = bind
The GET request header is as follows:
[HTML]GET/SN/index. php? Sn = 123 & n = asa http/1.1Accept :*/*Accept-language: ZH-CNHOST:
Non original, original address: http://blog.chinaunix.net/uid-25890465-id-3312861.html
1. Introduction to configparser
Configparser is the package used to read the configuration file. The configuration file format is as follows: section is
The random module in python is used to generate random numbers. The following describes the most common functions in the random module.
Random. Random
Random. Random () is used to generate a random number of points 0 to 1: 0 Random. Uniform
The
Concise Python tutorial --- 9. Data Structure
I believe that the data structure is not unfamiliar to anyone who has learned programming. Here we will only introduce the three built-in data structures in Python: List, tuples, and dictionaries.
List)
Concise Python tutorial --- 5. Operators and expressions
Almost all statements contain expressions. For example, 2 + 3 is a very simple expression. An expression can be divided into operators and operands. For example, the expression 2 + 3, + is
Concise Python tutorial --- 12. Input and Output
File
You can create a file class object to open the file. Use the Read and Write methods of the file class to read and write files.
For example, open the file "C:/abc.txt" (if this file must be
Concise Python tutorial --- 8. Module
This section describes how to use functions to reuse code blocks. If you have defined a bunch of functions and want to reuse them in other programs, what should you do?
In python, you can use modules to
Address: http://blog.csdn.net/ariesjzj/article/details/7844833
For example. For example, the. log file contains address records.
...
0x68cf94b0
0x68cf94b4
0x68ce94d8
0x68cf7460...
B. There are address records in log
...
0x68ce94d8
0x68cf94b0
...
After downloading the code, you need to install it:
1. First switch to the directory pyjnius-master, and then enter the command: sudo Python setup. py install
2. After the installation is complete, enter the command: sudo make
3. Then enter the
I have recently learned some basic Python configuration problems. It has been tested and feasible.
1. Download and install PythonPython-2.7.2.msiHttp://www.python.org/download/For example, to download Python 2.7.2, the installation directory is c: \
Document directory
List
Tuples
Dictionary
For list, refer to lifecycle:
[10, 20, 30, 40] ["spam", "bungee", "swallow"] ["hello", 2.0, 5, [10, 20]] Read element: the index of the list can be any integer expression. If it is a negative number, it
Today, I learned something about Python's data structures such as list and dictionary, because I have read this content before. In addition, I feel that python is similar to Java, so it doesn't look good.
I want to learn it for several days, and I
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