1. Capitalize the first letter of the string>>> name = "Xiaoming">>> print (Name.capitalize ())//capitalize method to capitalize the first letter of a stringXiaoming2. Count the number of characters in the string>>> name = "Xiaoming">>> Print
Operators and conditional statementsArithmetic operators
operator
Description
Example
+
Add-Two objects added
A + B output result 30
-
Minus-get negative numbers or one number
Pycharm development environment settings and familiarity.Practice basic input and output:Print (' Hello, {}. '. Format (name))Uprint (SYS.ARGV)How to use the library:Import ...From ... import ...Conditional statements:if (ABS (POS))) BreakLoop
ReviewInt/float/str/list/tuple/dictIntegers and floating-point types are immutable, not sequencesThe string is immutable and is a sequenceThe list is mutable and is a sequenceTuples are immutable and are sequencesDictionaries are can become, but not
Requirements:1, write a shopping cart sequence code2. Use the list to store the product list of the mall and save it to the list Shopping_mail3, the shopping cart list is Shopping_cart4, the user first enter the salary amount, judge the input as the
Python decorator learned a few, more difficult to understand, close-up this blog analysis of the principles and examples of adorners:First, the concept of adornersThe Python adorner is a function that expands the function of the decorated function
Encountered a permutation of the following problems, did not calculate their own, and finally in Python in the permutation library function to obtain the answer. The total number of 10-bit students should be 10!. However, it is not clear how the
First, preface1 def F1 (): 2 Print ("F1 is the name of this function!") ")3 4"F1" 5 Print("%s is a string " % s)In the above code, we must distinguish between two concepts, F1 and "F1". The former is the function name of function F1, the
#9.8.3 Remove missing number "" "1.spam001.txt,spam002.txt,spam005.txt, so. Remove the front and then increment by 2. Some numbers are vacated, and the vacated areas are specified. Then change the numbering. "" "Import re,os,shutil#find_path=input ("
Contours in the OpenCV1.1 What is a contourThe contours can be simply thought of as continuous points (connected to the boundary) linked together, with the same color or grayscale. Profiles are useful for shape analysis and object detection and
A, Dictionary (dictionary)1. The dictionary (dictionary) is another very useful built-in data type in Python.2, the list is an ordered combination of objects, the dictionary is an unordered collection of objects. The difference between the two is
304 What is a status code?If the client sends a conditional GET request and the request is allowed, and the contents of the document (since the last time it was accessed or according to the requested condition) have not changed, the server should
Hashing algorithmHashing algorithm: Hash algorithm is not a specific algorithm but a class of algorithms collectively, as long as the completion of this function is a hashing algorithm, hashing algorithm is also called hash algorithm. At the same
Use the enumerate function in python, pythonenumerateEnumerate () Description
Enumerate () is a python built-in Function
Enumerate indicates enumeration and enumeration in the dictionary.
For an iterable/traversed object (such as a list or
Sesame HTTP: Analysis of Ajax crawls toutiao.com's street photos, ajax today
In this section, we take toutiao.com as an example to try to capture webpage data by analyzing Ajax requests. The goal of this capture is today's toutiao.com. After the
Python + Selenium notes (17th): Operation cookie, pythonselenium
(1)Method
Method
Simple Description
Add_cookie (cookie_dict)
Add cookie information to the current sessionCookie_dict: the dictionary, name, and value are
Sesame HTTP: Install PyMongo and sesame httppymongo
In Python, if you want to interact with MongoDB, you need to use the PyMongo library. Here you will learn about its installation method.1. Related Links
GitHub:
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