#Collection#Concept#unordered, non-random-access, non-repeatable collection of elements#similar to the concept of a set in mathematics, it is possible to perform logical operations such as intersection, subtraction, and complement.#divided into
Print ("Today is 2018.2.22")name = ' SUPer 'Print (' Hello, ' +name+ ' today is good or not? ')# All of them are lowercase string.lower ()Print (Name.lower ())# ALL CAPS String.upperPrint (Name.upper ())# First letter is capitalized
Goto: The delivery of a python function parameter (parameter with an asterisk description)The transfer of function parameters in Python is passed by assignment. The use of function parameters has two important aspects to note: 1. How the function
One1. Upper ()Function: Converts a character in a string to uppercasein [+]: spamout['hello,world'in[print(Spam.upper ()) Hello,world2.lower ()Function: Converts a character in a string to lowercasein [+]: spam = spam.upper () in []:
I. BACKGROUNDThe requests module is used to obtain the post information of Youdao Dictionary Web page, BeautifulSoup to obtain the required content and generate GUI interface through Tkinter module.Second, the Code
The fanyi.py code is as
http://www.cnblogs.com/alex3714/articles/5830365.html What to look forSocket Sever#!/usr/bin/env python#-*-coding:utf-8-*-#Author Ian Ying#Mail: [email protected]ImportSocketImportOsserver=socket.socket () Server.bind ('localhost', 6969))#bind is
first, the process : process-oriented program design is the core process (pipeline thinking), the process is to solve the problem, process-oriented design is like a well-designed pipeline, consider when to deal with what things.Pros: Dramatically
Tag:exchange incr location selection art pytho list cat shel def bubble_sort (a_list): For Pass_num in range (len (a_list)-1, 0,-1): For I in Range (Pass_num): if A_list[i] > a_list[i + 1]: A_list[i], a_list[i + 1] = a_list[i +
The memory management of Python is automatic. Python uses reference counting and garbage collection to manage memory.Reference count: Each object has a number of objects that reference it. Objects with a reference count of 0 are treated as garbage.
First, the module1.import ....A py file can be used as a moduleModule import: Directly import the file name, do not need to take the suffixFunction call in module: module name. function name ()There are three things to do when importing a module: 1.
Tag: Parameter causes lock UI filename system add Add expression1.ETC file function:(1)/ETC/PASSWD user account information.(2)/etc/shadow secure user account information.(3)/etc/group group account information.(4)/etc/gshadow security group account
I. Django built-in ADMIA.configuring a routeUrlpatterns = [ url (r'^admin/', Admin.site.urls), ]B. Custom admin in the admin.py only need to talk about the mode of a class registration, you can implement additions and deletions in the
Enumerate () function usage in PythonFirst out a topic: 1. There is a list= [1, 2, 3, 4, 5, 6]Please print the output:0, 11, 22, 33, 44, 55, 6Print output,2. Reverse list to [6, 5, 4, 3, 2, 1]3. Select the even number in a and the result is [4, 8, 12
ImportOS#Os.system ()#Os.mkdir ()classDog (object):#name = ' KK ' def __init__(self,name): Self.name=name#@staticmethod #静态方法, it's really nothing to do with the class, and it's not going to take the self argument. #@classmethod #类方法, the self
12 If...else of Process Control既然我们编程的目的是为了控制计算机能够像人脑一样工作,那么人脑能做什么,就需要程序中有相应的机制去模拟。人脑无非是数学运算和逻辑运算,对于数学运算在上一节我们已经说过了。对于逻辑运算,即人根据外部条件的变化而做出不同的反映,比如1 如果:女人的年龄>30岁,那么:叫阿姨2 if: Woman's age >30 years old, then: Call aunt, otherwise: called Miss 3 if:
# Implement a complex subtraction precedence operation with parentheses# mainly used in regular expressions, while loops, lists of several methods.# to implement the required arithmetic functions the code is divided into two parts, and one is a
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