One, multi-threaded1, sequential execution of a single thread, note that in order to execute, you need to use join.1 #Coding=utf-82 3 fromThreadingImportThread4 Import Time5 6 defmy_counter ():7i =08 for_inchRange (100000000):9i = i + 1Ten
BackgroundJava project, package dependencies are generally maven management, and of course, Gradle, for the management of the package is very convenient, MAVEN will just add the dependency package in the Pom.xml maven coordinates can be, that python?
To translate English and other languages into Chinese by invoking Youdao's APICode:#Coding=utf-8ImportUrllibImportUrllib2ImportJSONImport TimeImportHashlibclassYoudaofanyi:def __init__(self, AppKey, Appsecret):
Import= [1, 2, 3, 4, 5];random.shuffle (a)print a#[2, 3, 1, 5, 4]
The scientific experiment that must be seen in this life-water knows the answer Http://v.youku.com/v_show/id_XMjgzMzcwNDk4OA why watch the documentary http://v.youku.com/v_show/id_
Regular expressionsFirst, query functionImportRes='Besttest is good are'Print(Re.match (R' be', s). Group ())#string pre-plus R for the original string#The match method receives 3 parameters, the first one is the regular expression, the second is
Os.path.abspath (PATH)#return Absolute PathOs.path.basename (PATH)#return file nameOs.path.commonprefix (list)#returns the longest path common to all paths in the list (multiple path). Os.path.dirname (PATH)#return file pathOs.path.exists
1.python comments.Python notes are divided into single-line and multiline comments, single-line comments are #, and multiline comments are three single or three double-quotes.2.python file format and page encoding.2.1 Generally through the Python
One, print 99 multiplication table:#coding: Utf-8for i in range (1,10): for J in Range (1,i+1): Print ("%dx%d=%d")% (j,i,j*i), print ' \ n 'Results:650) this.width=650; "title=" 99.png "alt=" wkiom1llma-trl7_aaassxicmss619.png-wh_50 "src=" https://s1
#take file suffix>>> Os.path.splitext ("/root/a.py")('/root/a','. PY')#Fetch directory and file name>>> Os.path.split ("/root/a.py")('/root','a.py')The scientific experiment that must be seen in this life-water knows the answer
When you define a function, Python can not only set normal formal parameters:def fun (arr1,arr2= ' I am number 2nd parameter '): #arr1为必传参数, arr2 can be used without, you can also pass in two special parameters: a parameter with a * or a * *. These
Brief introduction:
AJAX = Asynchronous JavaScript and XML (asynchronous JavaScript and XML).
AJAX is not a new programming language, but a new method of using existing standards.
AJAX is the art of exchanging data with a server and updating parts
1. String length
#strlen (str) # string length function nameStr= ' Apples ' # assigns the string "apples" to the variable strPrint (len (str)) # Prints the length of the string
2. Find characters
#strchr (STR1,STR2) # Find character function
1. Common symbols for regular expressions
'.' The default match is any character except \ n, if you specify flag Dotall, match any character, including the newline ' ^ ' match character beginning, and if you specify flags MULTILINE, this
Today with a form of automatic submission, to further learn the use of selenium
Practice Goals
0) Use selenium to start Firefox and load the specified page (this section can be viewed in my article)
1) page element lookup (multiple ways to find:
My python diary --- DAY1, python diary --- DAY1
I learned how to teach Alex in the python tutorial of Alex. Hey. I hope I can stick to it.
I reviewed the basic knowledge I learned earlier. I hope that I can go further and further on the way to
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