What can 1.Python do?① can use programming code to do their own website;② can do the backstage of the network game;③ ...2.Python Learning now, there are still doubts about the place.① is not familiar with the application of English nouns in the code;
ImportUnitTestImportDDT #第三方库data=[[1,2],[3,4],[5,6]] @ddt. DDTclassmytestcase (unittest. TestCase):#when there is only one parameter@ddt. Data () deftest_01 (self,a):Print(a) @ddt. Data (*data)#indicates the parameter, if the argument is data,
A function is a function block that can be called repeatedly.First, the definitiondef function name (parameter): ... . function Body .... return valueRequirements:
def: Keywords for functions
Function Name: Use function name
CSS enables precise pixel-level control of the placement of elements in a Web page, supports almost all font-size styles, and has the ability to edit Web page objects and model styles. CSS can not only statically modify the Web page, but also with a
The most distinctive feature of Python is the code that is labeled as a block in indentation.below we use the IF selection structure example, if followed by the condition, if the condition is true, then execute a block of code that belongs to the
Tag: Time () use the signal to process frame's own logs amp Port example==signal module = = You can use the ' signal ' module to configure your own signal processor (signal handler), as shown in [Example 3-11 #eg-3-11]. When the interpreter receives
Random number ModuleImport RandomRandom.random () between #随机一个浮点小数 0-1Random.uniform (1,3) #指定随机的小小数范围Random.randint (1,10) #随机一个整数 (parameter is random range)Random.randrange () #随机对一个range范围进行随机Random.choice () #随机一个序列 (can be strings and lists,
Logging module
1. List all status and print to terminal.ImportLogginglogging.debug ("Test Debug")#debugging, error-removingLogging.info ("Test")#Informationlogging.warning ("user [Xsk] 3")#WarningLogging.error ("Test
XML module
Create your own XML documentImportXml.etree.cElementTree as Etnew_xml= ET. Element ("personinfolist") Personinfo= ET. Subelement (New_xml,"Personinfo", attrib={"enrolled":"Yes"}) name= ET. Subelement (Personinfo,"name")
What can 1.Python do?⑴python is their main language.①web Development② Game Script③ Robot Development④ Computer Vision⑤ Internet of Things management⑵python is their first language.① Data analysis② Cloud Computing System Management③ AI④ Network
Import Module
I. Module INTRODUCTION1. DefinitionModules: Used to logically organize Python code (variables, functions, classes, logic: Implementing a function),The essence is. py end of the python file (file name: test.py, corresponding
Reptiles often use this, found a more useful methodOriginal link: http://blog.csdn.net/u012189659/article/details/36391837Background: Selenium+python is in the learning phase, after the functional implementation began to organize the code before
Django case 1 (blog): 1. Create a project, APP, and djangoapp
1. Create a project
Method 1: use command line to create a project. Run the following command on disk D cmd:
Django-admin.py startproject myblog
Method 2: Use pycharm to create a project.
Data analysis and presentation-Matplotlib library entry, data analysis matplotlibMatplotlib library Introduction
Matliotlib is an excellent third-party library for data visualization in Python.
Matliotlib library effect see:
Python traverses folders,
Reference blog: http://www.cnblogs.com/lincj/p/5617605.htmlI. OS. walk ()
OS. walk (top, topdown = True, onerror = None, followlinks = False)
You can get a three-element tupple (dirpath, dirnames, filenames ),
The first is
Short book markdown tutorial, short book markdown1. Support for Markdown editor Windows
We recommend Sublime Text 3, a powerful and elegant editor.MarkdownPad, an editor that can directly preview the typographical effect.Mac
It is recommended that
Python simple Backup File Script v1.0,Overall Thinking
The directory to be backed up is listed as a list, which is compressed and backed up by executing system commands.
The key lies in constructing commands and using OS. system () to execute. At
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