Type Conversions
function
Description
Example
int (x [, Base])
Converts x to an integer, base optional, binary, default to Decimal
Float (x)
Convert x to a floating-point number
In the digital currency of the popular stalls, bitcoin, the currency of the value of the money is not trustworthy. Perhaps you are as curious as many people, want to approach it, but only because of the block chain technology behind, blocking the
Object-oriented core is object, object is instantiated by class, then there is an inheritance relationship between class and class, the inherited class is called parent class, and the class of parent class is subclass.
The subclass inherits the
Recently in the study deeplearning, the theory looked over, ready to start using TensorFlow to do development. Of course, we need to use Python now. Accustomed to automatically fill the full function, or want to be in Python can be automatically
Socket.getaddrinfo (host, Port, Family=0, Socktype=0, proto=0, flags=0) #根据给定的参数host/port, converted to a five-tuple containing the socket object.
#参数host为域名, given as a string to represent an Ipv4/ipv6 address or none.
#参数port如果字符串形式就代表一个服务名, such
Text processing often determines whether a string is a letter, a number, or a Chinese character, and the Python str module provides methods but does not support Unicode, so imitating the Str method enables the kanji/digit/alphanumeric method of
P=list.index (value)
List is the name of the listing
Value is a lookup
P is value in the location of the list
The following is quoted from: http://www.linuxidc.com/Linux/2012-01/51638.htm
Summary of Python3.2.2 list operations
List operation:
When you need to match a string with a regular expression in Python, you can use a module, the name re' Match ' scan a string start from the very left,if it not match,it 'll break
#coding =utf-8
# importing RE module import re
# using the match
...... If you have to find a book that you can hold in your hand, the standard of a good Python book is either to build on the breadth or to be deep. In terms of breadth, Python programming gold is doing well; in depth, the Python cookbook and the
Just beginning to learn python, read the book on the Code:
#根据给定的年月日以数字的形式打印出来
months = [
' January ',
' febuary ', '
March ',
' April ',
' may ',
' June ' ,
' July ',
' August ',
' September ',
'
1, conditional statement
2. Circular statements
3. Iterator
4. List resolution
5, Generator expression
1, conditional statement
The simplest conditional statement:
If expression:
Expr_true_suite
As above, if is the keyword, expression is a
One: Python features
1. Software Quality
1.Python programs have good readability, consistency and software quality.2.Python supports advanced reuse mechanisms for software development, such as object-oriented 2. Improve developer
Exception Hint:
File "demo.py", line 6 syntaxerror:non-ascii character ' \xe4 ' in file demo.py on line 6, but no encoding declared; Http://www.python.org/peps/pep-0263.html for details
Reason:
When writing python, when you use the Chinese
Eat enough of Java's bitterness, so Python is good.Starting today, we have to go to Python.First of all, learning Python requires a Python environment, and a handy integrated development environment.Python Environment Download:
# Enum is used for enumeration, there is an enum under the module, we define the class to inherit it # once inherited, then we define the key (MUFANWU), cannot have duplicate values. # If you want to ensure that value (MUFANWU) is not duplicated,
IdeasFirst we need to know some of the parameters of the GitHub default avatar.
The GitHub default avatar is a 420*420 pixel square image with a 5*5 block matrix with 70*70 pixels per block. The distance of the block matrix from the
2.1. Define an adorner that accepts parametersIn understanding the previous article, we understand the idea of defining an adorner that accepts parameters.Idea: Define a function that takes parameters in the outer layer of the adorner function, and
Review:1. Dynamic language
Sys.getrefcount ()//view reference count of objects
Increase the object's reference count scenario
When an object is created: The variable name is created as an assignment, and the variable
When adding
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