In this article, let's look at the knowledge of one of the catalogs in Python, and in this article we'll look at
how Python can change the directory name .
ChDir () method
You can use the ChDir () method to change the current directory. The
1, the variable name in Python can be a combination of letters, numbers, underscores;2, the variable name in Python cannot start with a number;3. Variable names in Python cannot be keywords (' and ' | ' As ' | ' Assert ' | ' Break ' | ' Class ' | '
A. struct moduleThe module can convert a type to a fixed-length bytesImport Structlst = [1,2,4,3,5,]lst1 = [1,2,4,3,5,7,8,9= struct.pack ('i', Len (LST)) # Convert the length of the list to a fixed 4 byte b = Struct.pack('i', Len (lst1))Print (A,
Packaging
Use commas to split multiple values together
Essentially, returning a tuple, just omitting the parentheses
Python-specific syntax, learned and borrowed from many languages
# defined as Ganso # Package 1 and 2 Cheng
#Loop list Don't delete thingsLis = [11,22,33,44,55]#For i in range (len (LIS)):#print (i)#del Lis[i]#print (LIS) #报错, #because each deleted element is the next list after the deletion, #This causes the list to not be indexed after#Delete Odd
First, the name spacedefinition : Name-to-object mapping. A namespace is an implementation of a dictionary, a key is a variable name, and a value is a value that corresponds to a variable. The namespaces are independent of each other and cannot have
Environment:Win7Python 3.6.4Cx_freeze version xxxWould like to install a Python 3 can be packaged EXE, has been installed Cx_freeze failed to synthesize a few articles. Finally made it.Overall Analysis:I did not go to the official website to
Installing Virtualenvpip install virtualenvCreate a virtual environmentvirtualenv testdirGo to this directoryActivate.bat access to the virtual environmentDeactivate.bat exiting the virtual environmentThe virtual environment needs us to know the
1. Install PythonWindowshttp://www.python.org Download Python installation packagesuch as Python-2.7.12.msi performing the installationAfter the installation is complete, search program and file->cmd->pythonAppear"" Python 2.7.13
This chapter describes the use of circles to circle circles using the
python language
:
#!/usr/bin/python#-*-coding:utf-8-*-if __name__ = = ' __main__ ': from Tkinter import * canvas = canvas (width=80 0, height=600, bg= ' yellow '
Python's queue moduleProvides a synchronized, thread-safe queue class, including FIFO (first-in-first-out) queue Queue,lifo (in-first-out) queue Lifoqueue, and priority queue priorityqueue. These queues implement the lock primitive and can be used
Let's look at this article today.
Pythonwrite (), I'll explain it in this article.
the Write method in Python
as well as the Pythonwrite property , and it can be used in Python programming where to explain. No more nonsense, let's get started.
This article describes the
python multithreading, want to know
python multithreading, you have to understand what is
Threads。
A thread is the smallest unit that the operating system can perform operations on. It is included in the process and is
In the previous three articles, we described in detail
Python MySQL DatabaseThe creation and use of the method, but in practical problems, it is also necessary to
MySQL Delete all lists under library, this article, as an additional article in the
What's good about Python programming in the previous article? Learn about the hottest Python CGI programming of the moment we have a brief introduction to what is
Python CGI programming,This article is an in-depth understanding and
Python CGI
Let's look at this article today.
Pythonread Method, I don't know, it doesn't matter. Because today is about Python.
Read() method, and know
What does read mean?, so let's look at today's article.
Overview
The read () method is used to read the
In this article, let's look at the python
Next Method, before we enter the article, we first need to know
Pythonnext MethodWhat is it
Next () methodWhat it does, what it can do with Python programming. These things we can all learn in today's
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