ListThe list is called the container type data type.# Li = [123, ' Old boy ', True, [1, 2, 3], {' name ': ' Alex '}, (1, 2, 3)]Index# L1 = [' Wusir ', True, ' Alex ', ' Laonanhai ', ' Ritian ', ' Taibai ']# print (l1[0]) # print (l1[1], type (l1[1]))
First, basic knowledge 1, the Computer FoundationCPU: ComputeMemory: CacheHDD: StorageOperating system: A bridge between hardware and softwareApplications: Platform for Apps2. History of Python1989 Uncle Tortoise, The pursuit of clear, simple,
1: Install the CentOS system first:Why choose a CentOS system instead of Ubuntu?I tried on Ubuntu three times to install Python and scrapy, the results are not successful, in OPS Wang's proposal to use CentOS;(I can't help but spit, Python
Topic:Suppose you have a boring task to find all the phone numbers and email addresses in a long page or article. If you turn pages manually, you may need to look for a long time. If you have a program that can find the phone number and e-mail
HurriedPrint (s)S1 = S.decode (# Utf-8 to Unicode,decode (decoding) need to indicate the current encoding formatPrint (S1,type (S1))S2 = S1.encode (# Unicode to Gbk,encode (encoded) need to indicate the generated encoding formatPrint (S2,type (s2))S3
How to use common assertions for automated testing (python)In the automated test to find elements and operations, if the elements are easy to look at, I believe you can be more proficient in writing use case script, but light operation may not be
Format the output. %s%d# name = input (' Please enter name: ') # age = input (' Please enter Ages: ') # sex = input (' Please enter Gender: ') ## msg = ' My name is ' + name + ' My age is ' + ' my gender is ' + sex ' # Print (msg) "------------info
LEGB order: From inside to outsideLocal: Partial scopeEnclosing: Nested parent local scopeGlobal: ScopeBuild_in: Built-in function scopeThe variables declared by the Global keyword must be on the global scope, not at the nested scope, and the
Three ways to develop 1, object-oriented class 2, process-oriented def 3, functional development def II , the function of the parameter 1, set a function, and the parameters of the location parameter
Seven. Output1. What is output?
The transmission of energy, signals, etc. from a mechanism or device.
2. Our common output:3. Output form in the program:# Print -----> is actually output from the consolePrint (' Hello World ')Print ('
One, the requirement is to build a project on the desktop with a name for beauty1) CD Desktop2) mkdir Meizhuang_server3) Install the virtual environment pipenv--python3.64) Enter virtual environment pipenv Shell will generate two files Pipfile and
Data structure Python's data structures are list dictionaries that use them to efficiently store dataAlgorithm writer program Flow programming logic
Process oriented: Write base code from top to bottom according to business logic
Sys:this module provides access to some variables used or maintained by the interpreter and to functions that interact St Rongly with the interpreter. It's always available. See also: https://docs.python.org/3/library/sys.html
Os:this module
1 What is a variable declaration variable#变量名 = variable value age=18gender1= ' Male ' gender2= ' female 'Variable action: "Change" = = Change, "Quantity" and "Measure/Save State Program" Operation Essence is a series of state changes, the purpose
Print (ABS (-10)) # function can be variable f = ABSF ( -10) def add (x,y,f): Return f (x) + f (y) x = -5y = 6f = abs# Simple Functional Programming print (Add (x,y,f)) # High The Order function # map/reduce# map () function receives two parameters,
I. What is object-oriented programming 1, process-oriented programmingProcess-oriented: The core is the process of two words, the process is to solve the problem of the steps, is to do first, what to do. Writing a program based on this idea is like
Part 1:Comments are represented in 3 ways:msg = "I love Beijing Tian ' an door!"Print (msg)#print (msg) #可以用作单行注释表示' Print (msg) ' single quotation mark or double quotation mark can be used to denote multiple lines of comment"" "Print (msg)" ""
This article mainly introduces the Xlsxwriter module method that installs Python under Windows, has the certain reference value, now shares to everybody, has the need friend to refer to
Installing Python's Xlsxwriter module in Windows environment,
This article mainly introduces the implementation of Python least common multiple algorithm, involving Python numerical operations, judgments and other related operational skills, the need for friends can refer to the following
In this paper, 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