Today,i learned so much knowledge about the basis of Python.Firstly, I studied methematical operators like ' + ', '/' and so on.For instance,2*3=5, 4/2=2.0 and so on.And, I also knew about comparison operators like ' > ', ' For exmple,2 Afterwards,i
Python Basics-Basic data type (number (numeric) string (string) list (list) Tuple (tuple) sets (collection) Dictionary (dictionary))There are six standard data types in the Python3:Number (numeric)String (String)List (lists)Tuple (tuple)Sets
name = "Gaowang" pwd = "123.ABC" list_he=[] #定义空列表, after receiving For i in range (3): username = input (" Please enter your account number: ") password = input (" Please enter your password: ") if
1. All ([-1, 0, 1]) #判断是否全是不等于0的数2. Any ([ -1,0,1]) # has a number not 0 returns true any ([]) return False3.ascii ([1, 2, ' Open plug ']) #进行ascii conversion4.bin (1) #十进制转换为二进制5.bool (1) #判断是否为真6. A = bytes (' abcde ', encoding = ' utf-8 ') #abcde
To summarize:Process-oriented programming: According to the business logic from top to bottom write code-----is a project to write to the end, the reuse of poorFunction: Encapsulates some specific function code into a function------convenient to
# This is a learning note for the Liaoche teacher Python tutorialThe Python platform de facto image Processing Standard library is PIL: Python Imaging library. A group of volunteers created a compatible version based on PiL, named Pillow1 ,
1. Function Scope Introductionfunction scopeThere are 4 types of function scopes in Python:
l:local, local scope, which is the variable defined in the function:
E:enclosing, the local scope of the nested parent function, which is the
Summary1. Determine if something is in something, in or not, and the result is a Boolean value (False or True)Name = "Electromagnetic radiation"v = "Inside" in namePrint (v)2. Operators+ - * / ** % //The percent is the remainder, example 9%2=1,
1. And or not preferably in parentheses, first calculate parenthesesExecution order:Front to backResultsTrue OR ==>trueTrue and ==> continue walkingFalse OR ==> continue.False OR ==>false2. Several major symbols are categorizedThe result is a value:
The OS module is about file/directoryImport syntaxImport OSRelated methodsPath.abspath () to get the file under the current pathThe result of Os.path.abspath (' checkbox.html ') is e:/python-project/threecases/checkbox.html, but cannot be opened
Thank you for this progressive self, hope someday, can be glittering.1, the completion of the first Hello World program;2, if the initial grasp of the statement, while, for the initial grasp of the loop;3, the first week of work will be completed in
# This is a learning note for the Liaoche teacher Python tutorial1. OverviewTo write maintainable code, we group many functions into separate files so that each file contains relatively few code, and in Python, a. py file is called a module.1.1 ,
#!/usr/bin/env python#_*_ Coding:utf8 _*_#### The script needs to be installed with fping command if no installation required fping#### Yum Install Fpingimport Osip = "10.10.0.1/24" ips = ["10.10.0.1/24", "192.16.17.27/24"] # Input List of
#Python 3.6#!/usr/bin/env python#-*-coding:utf-8-*-__author__='Bh8ank'Importxlrd" "=================XLRD is responsible for reading Excel, which is functionally read-only ===============================================" "myfile= Xlrd.open_workbook
The use of the Pickle library is mentioned in the article "Understanding what is machine learning through a simple example", which is described in this paper.
So why do you need to serialize and deserialize this operation?
Easy to store. The
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