Python basics 4

Contents of this section

  1. List and tuple operations
  2. String manipulation
  3. Dictionary operation
  4. Collection operation
  5. File operations
  6. Character encoding and transcoding

1. List and tuple operations###

The list is one of our most commonly used data types in the future. Through the list, the most convenient data storage, modification and other operations can be realized.

Definition list

names =['Alex',"Tenglan",'Eric']

Access the elements in the list by subscript, the subscript starts counting from 0

>>> names[0]'Alex'>>> names[2]'Eric'>>> names[-1]'Eric'>>> names[-2] #You can also take it backwards
' Tenglan'

Slice: take multiple elements

>>> names =["Alex","Tenglan","Eric","Rain","Tom","Amy"]>>> names[1:4]  #Take the number between subscript 1 and subscript 4, including 1, excluding 4['Tenglan','Eric','Rain']>>> names[1:-1] #Take the subscript 1 to-Value of 1, not including-1['Tenglan','Eric','Rain','Tom']>>> names[0:3]['Alex','Tenglan','Eric']>>> names[:3] #If it is taken from the beginning, 0 can be ignored, and the effect is the same as the previous sentence
[' Alex','Tenglan','Eric']>>> names[3:] #If you want to take the last one, you must not write-1. The only way to write
[' Rain','Tom','Amy']>>> names[3:-1] #such-1 will not be included
[' Rain','Tom']>>> names[0::2] #The next 2 is the representative, every other element, take one
[' Alex','Eric','Tom']>>> names[::2] #Same effect as the previous sentence
[' Alex','Eric','Tom']

Append

>>> names
[' Alex','Tenglan','Eric','Rain','Tom','Amy']>>> names.append("I am new here")>>> names
[' Alex','Tenglan','Eric','Rain','Tom','Amy','I am new here']

insert

>>> names
[' Alex','Tenglan','Eric','Rain','Tom','Amy','I am new here']>>> names.insert(2,"Forcibly insert from the front of Eric")>>> names
[' Alex','Tenglan','Forcibly insert from the front of Eric','Eric','Rain','Tom','Amy','I am new here']>>> names.insert(5,"Insert from behind eric to try a new pose")>>> names
[' Alex','Tenglan','Forcibly insert from the front of Eric','Eric','Rain','Insert from behind eric to try a new pose','Tom','Amy','I am new here']

modify

>>> names
[' Alex','Tenglan','Forcibly insert from the front of Eric','Eric','Rain','Insert from behind eric to try a new pose','Tom','Amy','I am new here']>>> names[2]="Time to change">>> names
[' Alex','Tenglan','Time to change','Eric','Rain','Insert from behind eric to try a new pose','Tom','Amy','I am new here']

delete

>>> del names[2]>>> names
[' Alex','Tenglan','Eric','Rain','Insert from behind eric to try a new pose','Tom','Amy','I am new here']>>> del names[4]>>> names
[' Alex','Tenglan','Eric','Rain','Tom','Amy','I am new here']>>>>>> names.remove("Eric") #Delete specified element
>>> names
[' Alex','Tenglan','Rain','Tom','Amy','I am new here']>>> names.pop() #Delete the last value of the list
' I am new here'>>> names
[' Alex','Tenglan','Rain','Tom','Amy']

Extension

>>> names
[' Alex','Tenglan','Rain','Tom','Amy']>>> b =[1,2,3]>>> names.extend(b)>>> names
[' Alex','Tenglan','Rain','Tom','Amy',1,2,3]

copy

>>> names
[' Alex','Tenglan','Rain','Tom','Amy',1,2,3]>>> name_copy = names.copy()>>> name_copy
[' Alex','Tenglan','Rain','Tom','Amy',1,2,3]

statistics

>>> names
[' Alex','Tenglan','Amy','Tom','Amy',1,2,3]>>> names.count("Amy")2

Sort & flip

>>> names
[' Alex','Tenglan','Amy','Tom','Amy',1,2,3]>>> names.sort() #Sort
Traceback(most recent call last):
 File "<stdin>", line 1,in<module>
TypeError: unorderable types:int()<str()   #3.Different data types cannot be sorted together in 0
>>> names[-3]='1'>>> names[-2]='2'>>> names[-1]='3'>>> names
[' Alex','Amy','Amy','Tenglan','Tom','1','2','3']>>> names.sort()>>> names
['1','2','3',' Alex','Amy','Amy','Tenglan','Tom']>>> names.reverse() #Reverse
>>> names
[' Tom','Tenglan','Amy','Amy','Alex','3','2','1']

Get subscript

>>> names
[' Tom','Tenglan','Amy','Amy','Alex','3','2','1']>>> names.index("Amy")2 #Only return the first subscript found

Tuple

A tuple is actually similar to a list. It also stores a set of numbers, but once it is created, it cannot be modified, so it is also called a read-only list.

grammar

names =("alex","jack","eric")

It only has 2 methods, one is count, the other is index, and it's done.

Program exercise

Please close your eyes and write the following program.

Procedure: shopping cart procedure

demand:

  1. After starting the program, let the user enter the salary, and then print the list of products
  2. Allow users to purchase products based on the product number
  3. After the user selects the product, check whether the balance is sufficient, deduct directly if it is enough, and remind if it is not enough
  4. You can withdraw at any time, when you withdraw, print the purchased goods and balance
product_list=[('Iphone',5800),('Mac Pro',9800),('Bike',800),('Watch',10600),('Coffee',31),('Alex Python',120)]

shopping_list=[] #Create an empty shopping cart
salary=input("Input your salary:") #Enter your balance
if salary.isdigit(): #Determine whether it is a number
 salary=int(salary)while True:for index,item inenumerate(product_list): #enumerate index
   print(index,item)
  user_choice=input("Choose to buy?>>>:") #Enter selection index
  if user_choice.isdigit(): #Determine whether the input is a number
   user_choice=int(user_choice)if user_choice <len(product_list) and user_choice >=0: #The number entered is greater than or equal to 0 and less than the length of the product list
    p_item = product_list[user_choice] #Assign to p_item variable
    if p_item[1]<= salary:  #Determine whether the balance is less than or equal to
     shopping_list.append(p_item) ##Add to cart
     salary-=p_item[1] #The total balance decreases accordingly
     print("Added %s into shopping cart,your current balance is \033[31;1m%s\033[0m"%(p_item, salary)) #Print the purchased goods and the remaining amount
    else:print("\033[41;1m your balance is only left[%s]La, buy some wool\033[0m"% salary) #Print the remaining amount is less than the current product price
   else:print("product code [%s] is not exist!"% user_choice) #There is currently no serial number of the product
  elif user_choice =='q': #drop out
   print("--------shopping list------") #Print product list
   for p in shopping_list:print(p)print("Your current balance:", salary) #Print the remaining amount
   exit()else:print("invalid option") #Not a number

2. String manipulation

Features: Cannot be modified

name.capitalize()Capitalize the first letter
name.casefold()All uppercase to lowercase
name.center(50,"-")Output'---------------------Alex Li----------------------'
name.count('lex')Count the occurrences of lex
name.encode()Encode the string into bytes format
name.endswith("Li")Determine whether the string ends with Li
 " Alex\tLi".expandtabs(10)Output'Alex      Li', Will\How long space t is converted into
 name.find('A')Find A,Return its index when found, return not found-1 

format :>>> msg ="my name is {}, and age is {}">>> msg.format("alex",22)'my name is alex, and age is 22'>>> msg ="my name is {1}, and age is {0}">>> msg.format("alex",22)'my name is 22, and age is alex'>>> msg ="my name is {name}, and age is {age}">>> msg.format(age=22,name="ale")'my name is ale, and age is 22'
format_map
 >>> msg.format_map({'name':'alex','age':22})'my name is alex, and age is 22'

msg.index('a')Returns the index of the string where a
'9 aA'.isalnum()   True

'9'. isdigit()Is it an integer
name.isnumeric  
name.isprintable
name.isspace
name.istitle
name.isupper
 "|". join(['alex','jack','rain'])'alex|jack|rain'

maketrans
 >>> intab ="aeiou"  #This is the string having actual characters.>>> outtab ="12345" #This is the string having corresponding mapping character
 >>> trantab = str.maketrans(intab, outtab)>>>>>> str ="this is string example....wow!!!">>> str.translate(trantab)'th3s 3s str3ng 2x1mpl2....w4w!!!'

 msg.partition('is')Output('my name ','is',' {name}, and age is {age}')>>>"alex li, chinese name is lijie".replace("li","LI",1)'alex LI, chinese name is lijie'

 msg.swapcase case swap

 >>> msg.zfill(40)'00000my name is {name}, and age is {age}'>>> n4.ljust(40,"-")'Hello 2orld-----------------------------'>>> n4.rjust(40,"-")'-----------------------------Hello 2orld'>>> b="ddefdsdff_Haha">>> b.isidentifier() #Check whether a string can be used as a marker, that is, whether it conforms to the variable naming rules
True

3. Dictionary operation###

A dictionary is a key-value data type. Using a dictionary like the one we used in school, we can check the detailed content of the corresponding page by strokes and letters.

grammar:

info ={'stu1101':"TengLan Wu",'stu1102':"LongZe Luola",'stu1103':"XiaoZe Maliya",}

Features of the dictionary:

increase

>>> info["stu1104"]="Aoi Sola">>> info
{' stu1102':'LongZe Luola','stu1104':'Aoi Sola','stu1103':'XiaoZe Maliya','stu1101':'TengLan Wu'}

modify

>>> info['stu1101']="Mutoran">>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya','stu1101':'Mutoran'}

delete

>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya','stu1101':'Mutoran'}>>> info.pop("stu1101") #Standard delete pose
' Mutoran'>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya'}>>> del info['stu1103'] #Change posture to delete
>>> info
{' stu1102':'LongZe Luola'}>>> info ={'stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya'}>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya'} #Randomly delete
>>> info.popitem()('stu1102','LongZe Luola')>>> info
{' stu1103':'XiaoZe Maliya'}

**Find **

>>> info ={'stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya'}>>>>>>"stu1102"in info #Standard usage
True
>>> info.get("stu1102")  #Obtain
' LongZe Luola'>>> info["stu1102"] #Same as above, but see below
' LongZe Luola'>>> info["stu1105"]  #If a key does not exist, an error will be reported, get will not, it will only return None if it does not exist
Traceback(most recent call last):
 File "<stdin>", line 1,in<module>
KeyError:'stu1105'

Multi-level dictionary nesting and operation

av_catalog ={"Europe and America":{"www.youporn.com":["Lots of free,The world&#39;s largest","Average quality"],"www.pornhub.com":["Lots of free,Also big","Higher quality than yourporn"],"letmedothistoyou.com":["Mostly selfies,Lots of high quality pictures","Not much resources,Slow update"],"x-art.com":["High quality,Really high","All charges,Please bypass"]},"Japan and Korea":{"tokyo-hot":["How unclear about the quality,个人已经不喜欢Japan and Korea范了","I heard that it is charged"]},"mainland":{"1024":["All free,that&#39;s nice,A good person is safe","The server is abroad,slow"]}}

av_catalog["mainland"]["1024"][1]+=",Can crawl down with a crawler"print(av_catalog["mainland"]["1024"])
# ouput 
[' All free,that&#39;s nice,A good person is safe','The server is abroad,slow,Can crawl down with a crawler']

Other positions

# values
>>> info.values()dict_values(['LongZe Luola','XiaoZe Maliya'])

# keys
>>> info.keys()dict_keys(['stu1102','stu1103'])

# setdefault
>>> info.setdefault("stu1106","Alex")'Alex'>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya','stu1106':'Alex'}>>> info.setdefault("stu1102","Ronzelola")'LongZe Luola'>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya','stu1106':'Alex'}

# update 
>>> info
{' stu1102':'LongZe Luola','stu1103':'XiaoZe Maliya','stu1106':'Alex'}>>> b ={1:2,3:4,"stu1102":"Ronzelola"}>>> info.update(b)>>> info
{' stu1102':'Ronzelola',1:2,3:4,'stu1103':'XiaoZe Maliya','stu1106':'Alex'}

# items
info.items()dict_items([('stu1102','Ronzelola'),(1,2),(3,4),('stu1103','XiaoZe Maliya'),('stu1106','Alex')])

# Generate a default dict from a list,There is a pit that cannot be explained, use this less
>>> dict.fromkeys([1,2,3],'testd'){1:'testd',2:'testd',3:'testd'}

Loop dict

# Method 1for key in info:print(key,info[key])

# Method 2for k,v in info.items(): #Will convert dict to list first,Don&#39;t use it when the data is big
 print(k,v)

Program practice

Program: three-level menu

Claim:

  1. Print the three-level menu of province, city and county
  2. Can return to the previous level
  3. Can exit the program at any time
menu ={'Beijing':{'Haidian':{'Wudaokou':{'soho':{},'NetEase':{},'google':{}},'Zhongguancun':{'IQIYI':{},'Car home':{},'youku':{},},'Shangdi':{'Baidu':{},},},'Changping':{'Shahe':{'old boys':{},'Beihang':{},},'Tiantongyuan':{},'Huilongguan':{},},'Chaoyang':{},'Dongcheng':{},},'Shanghai':{'Minhang':{"People&#39;s Square":{'Fried chicken shop':{}}},'Zhabei':{'Train war':{'Ctrip':{}}},'Pudong':{},},'Shandong':{},}

exit_flag = False
current_layer = menu

layers =[menu]while not  exit_flag:for k in current_layer:print(k)
 choice =input(">>:").strip()if choice =="b":
  current_layer = layers[-1]
  # print("change to laster", current_layer)
  layers.pop()
 elif choice not  in current_layer:continueelse:
  layers.append(current_layer)
  current_layer = current_layer[choice]

Three-year menu literary youth version

4. Collection operation###

A collection is an unordered, non-repetitive combination of data. Its main functions are as follows:

Common operations

s =set([3,5,9,10])      #Create a set of values
  
t =set("Hello")         #Create a set of unique characters

a = t | s          #union of t and s
  
b = t & s          #the intersection of t and s
  
c = t – s          #Difference set (items are in t but not in s)
  
d = t ^ s          #Symmetric difference set (items are in t or s, but will not appear in both)
  
   
  
Basic operation:
  
t.add('x')            #Add one
  
s.update([10,37,42])  #Add multiple items in s
  
   
  
Use remove()One item can be deleted:
  
t.remove('H')len(s)length of set
  
x in s  
Test if x is a member of s
  
x not in s  
Test if x is not a member of s
  
s.issubset(t)  
s <= t  
Test whether every element in s is in t
  
s.issuperset(t)  
s >= t  
Test whether every element in t is in s
  
s.union(t)  
s | t  
Return a new set containing every element in s and t
  
s.intersection(t)  
s & t  
Return a new set containing the common elements in s and t
  
s.difference(t)  
s - t  
Return a new set containing elements in s but not in t
  
s.symmetric_difference(t)  
s ^ t  
Return a new set containing elements that are not repeated in s and t
  
s.copy()  
Return a shallow copy of set &quot;s&quot;

5. File operations

File operation process

  1. Open the file, get the file handle and assign it to a variable
  2. Operate files through handles
  3. Close file

The existing documents are as follows

Somehow, it seems the love I knew was always the most destructive kind
For some reason, the love I experience is always the most destructive one
Yesterday when I was young
Yesterday when I was young and frivolous
The taste of life was sweet
The taste of life is sweet
As rain upon my tongue
Like rain on the tip of your tongue
I teased at life asif it were a foolish game
I make fun of life as a stupid game
The way the evening breeze
Like a breeze at night
May tease the candle flame
Teasing candle flame
The thousand dreams I dreamed
I have dreamt about it thousands of times
The splendid things I planned
Those brilliant blueprints of my plan
I always built to last on weak and shifting sand
But I always build it on the perishable quicksand
I lived by night and shunned the naked light of day
I sing and sing to escape the naked sun of the day
And only now I see how the time ran away
It&#39;s only now that I can see how the years pass
Yesterday when I was young
Yesterday when I was young and frivolous
So many lovely songs were waiting to be sung
There are so many sweet songs waiting for me to sing
So many wild pleasures lay in store for me
There is so much wanton happiness waiting for me to enjoy
And so much pain my eyes refused to see
There is so much pain in my eyes but I turn a blind eye
I ran so fast that time and youth at last ran out
I run fast, and finally time and youth are gone
I never stopped to think what life was all about
I never stop to think about the meaning of life
And every conversation that I can now recall
All the conversations I remember now
Concerned itself with me and nothing else at all
Can&#39;t remember anything except me
The game of love I played with arrogance and pride
I play love games with arrogance and arrogance
And every flame I lit too quickly, quickly died
All the flames I lit went out too fast
The friends I made all somehow seemed to slip away
All the friends I made seemed to leave unconsciously
And only now I'm left alone to end the play, yeah
I&#39;m the only one to end this farce on stage
Oh, yesterday when I was young
Oh yesterday when I was young and frivolous
So many, many songs were waiting to be sung
There are so many sweet songs waiting for me to sing
So many wild pleasures lay in store for me
There is so much wanton happiness waiting for me to enjoy
And so much pain my eyes refused to see
There is so much pain in my eyes but I turn a blind eye
There are so many songs in me that won't be sung
I have too many songs that will never be sung
I feel the bitter taste of tears upon my tongue
I tasted the bitter taste of tears on my tongue
The time has come for me to pay for yesterday
It&#39;s finally time to pay the price for yesterday
When I was young
When I was young and frivolous

Basic operation

f =open('lyrics') #open a file
first_line = f.readline()print('first line:',first_line) #Read a line
print('I am the divider'.center(50,'-'))
data = f.read()#Read everything left,Do not use when the file is large
print(data) #print documents
 
f.close() #Close file

The modes of opening files are:

"+" Indicates that a file can be read and written at the same time

" "U" means that when reading, \r \n \r\n can be automatically converted to \n (same as r or r+ mode)

" b" means to process binary files (for example: FTP to send and upload ISO image files, linux can be ignored, windows need to mark when processing binary files)

Other syntax

def close(self): # real signature unknown; restored from __doc__
        """
  Close the file.
        
  A closed file cannot be used for further I/O operations.close() may be
  called more than once without error."""
  pass

 def fileno(self,*args,**kwargs): # real signature unknown
  """ Return the underlying file descriptor (an integer). """
  pass

 def isatty(self,*args,**kwargs): # real signature unknown
  """ True if the file is connected to a TTY device. """
  pass

 def read(self, size=-1): # known caseof _io.FileIO.read
        """
  Note that you may not be able to read it all
  Read at most size bytes, returned as bytes.
        
  Only makes one system call, so less data may be returned than requested.
  In non-blocking mode, returns None if no data is available.
  Return an empty bytes object at EOF."""
  return""

 def readable(self,*args,**kwargs): # real signature unknown
  """ True if file was opened in a read mode. """
  pass

 def readall(self,*args,**kwargs): # real signature unknown
        """
  Read all data from the file, returned as bytes.
        
  In non-blocking mode, returns as much as is immediately available,
  or None if no data is available.  Return an empty bytes object at EOF."""
  pass

 def readinto(self): # real signature unknown; restored from __doc__
  """ Same as RawIOBase.readinto(). """
  pass #Do not use it,No one knows what it is used for

 def seek(self,*args,**kwargs): # real signature unknown
        """
  Move to newfile position and return the file position.
        
  Argument offset is a byte count.  Optional argument whence defaults to
  SEEK_SET or 0(offset from start of file, offset should be >=0); other values
  are SEEK_CUR or 1(move relative to current position, positive or negative),
  and SEEK_END or 2(move relative to end of file, usually negative, although
  many platforms allow seeking beyond the end of a file).
        
  Note that not all file objects are seekable."""
  pass

 def seekable(self,*args,**kwargs): # real signature unknown
  """ True if file supports random-access. """
  pass

 def tell(self,*args,**kwargs): # real signature unknown
        """
  Current file position.
        
  Can raise OSError for non seekable files."""
  pass

 def truncate(self,*args,**kwargs): # real signature unknown
        """
  Truncate the file to at most size bytes and return the truncated size.
        
  Size defaults to the current file position,as returned by tell().
  The current file position is changed to the value of size."""
  pass

 def writable(self,*args,**kwargs): # real signature unknown
  """ True if file was opened in a write mode. """
  pass

 def write(self,*args,**kwargs): # real signature unknown
        """
  Write bytes b to file,return number written.
        
  Only makes one system call, so not all of the data may be written.
  The number of bytes actually written is returned.  In non-blocking mode,
  returns None if the write would block."""
  pass

with statement

In order to avoid forgetting to close the file after opening it, you can manage the context,

which is:

withopen('log','r')as f:...

In this way, when the with code block is executed, the internal file resource will be automatically closed and released.

After Python 2.7, with supports managing the context of multiple files at the same time, namely:

withopen('log1')as obj1,open('log2')as obj2:
 pass

Program practice

Program 1: Implement simple shell sed replacement function

Procedure 2: Modify haproxy configuration file

demand:

1、 check
 Input: www.oldboy.org
 Get all records under the current backend

2、 New
 enter:
  arg ={'bakend':'www.oldboy.org','record':{'server':'100.1.7.9','weight':20,'maxconn':30}}3. Delete
 enter:
  arg ={'bakend':'www.oldboy.org','record':{'server':'100.1.7.9','weight':20,'maxconn':30}}

demand
global       
  log 127.0.0.1 local2
  daemon
  maxconn 256
  log 127.0.0.1 local2 info
defaults
  log global
  mode http
  timeout connect 5000ms
  timeout client 50000ms
  timeout server 50000ms
  option  dontlognull

listen stats :8888
  stats enable
  stats uri       /admin
  stats auth      admin:1234

frontend oldboy.org
  bind 0.0.0.0:80
  option httplog
  option httpclose
  option  forwardfor
  log global
  acl www hdr_reg(host)-i www.oldboy.org
  use_backend www.oldboy.org if www

backend www.oldboy.org
  server 100.1.7.9100.1.7.9 weight 20 maxconn 3000

Original configuration file

6. Character encoding and transcoding###

Detailed article:

http://www.cnblogs.com/yuanchenqi/articles/5956943.html

http://www.diveintopython3.net/strings.html

Need to know:

  1. The default encoding in python2 is ASCII, and the default in python3 is unicode
  2. Unicode is divided into utf-32 (occupies 4 bytes), utf-16 (occupies two bytes), utf-8 (occupies 1-4 bytes), so utf-16 is the most commonly used unicode version. But utf-8 is still stored in the file, because utf8 saves space
  3. In py3, encode will change the string into bytes type while transcoding, and decode will also change bytes back to string while decoding

The above picture only applies to py2

#- *- coding:utf-8-*-
__ author__ ='Alex Li'import sys
print(sys.getdefaultencoding())

msg ="I love Beijing Tiananmen Square"
msg_gb2312 = msg.decode("utf-8").encode("gb2312")
gb2312_to_gbk = msg_gb2312.decode("gbk").encode("gbk")print(msg)print(msg_gb2312)print(gb2312_to_gbk)in python2
#- *- coding:gb2312 -*-   #This can also be removed
__ author__ ='Alex Li'import sys
print(sys.getdefaultencoding())

msg ="I love Beijing Tiananmen Square"
# msg_gb2312 = msg.decode("utf-8").encode("gb2312")
msg_gb2312 = msg.encode("gb2312") #The default is unicode,No need to decode,Super Plus enjoy
gb2312_to_unicode = msg_gb2312.decode("gb2312")
gb2312_to_utf8 = msg_gb2312.decode("gb2312").encode("utf-8")print(msg)print(msg_gb2312)print(gb2312_to_unicode)print(gb2312_to_utf8)in python3
  1. Built-in function

Recommended Posts

Python basics
Python basics 2
Python basics
Python basics 3
Python basics 4
Python basics 5
Python object-oriented basics
Python custom function basics
Basics of Python syntax
Python multi-process and multi-thread basics
Python multithreading
Python CookBook
Python FAQ
Python3 dictionary
python (you-get)
Python string
Python descriptor
Python exec
Python notes
Python3 tuple
CentOS + Python3.6+
Python advanced (1)
Python IO
Python multithreading
Python toolchain
Python3 list
Python multitasking-coroutine
Python overview
Python analytic
07. Python3 functions
Python multitasking-threads
Python functions
python sys.stdout
python operator
Python entry-3
Centos 7.5 python3.6
Python string
python queue Queue
Learn the basics of python interactive mode
Two days of learning the basics of Python
Centos6 install Python2.7.13
Python answers questions
Python basic syntax (1)
Python exit loop
Ubuntu16 upgrade Python3
Centos7 install Python 3.6.
ubuntu18.04 install python2
Python classic algorithm
Relearn ubuntu --python3
Python2.7 [Installation Tutorial]
Python string manipulation
Python 3.9 is here!
Python study notes (1)
CentOS7 upgrade python3
Python3 basic syntax
Python review one
linux+ubuntu solve python
Functions in python
Python learning-variable types
CentOS install Python 3.6
Python file operation