When we write code, we often operate databases, additions and deletions, databases have many types, relational databases and non-relational databases, here we introduce how Python operates MySQL, Redis and MongoDB.One,python operation MySQL database
Hop-Hop Accessibility toolPreparation Tools
ADB driver
Android phone
Turn on the phone's debug mode
USB access to your phone and computer.
Pycharm: The only one by one in the universe dedicated to Python development IDE
The problem with Python exercises is as follows:Description: There are four numbers, respectively: 1, 2, 3, 4Question: How many three digits can be composed of different and non-repeating numbers? What's the number? for in range (1,5): is in
Anaconda3 inside the bag with BS4, the province of my own installed.It has recently been felt that the modular notation makes the code clearer and easier to read. And with the increase of the code, it will be more convenient to find bugs. (I can't
Pycharm common shortcut keys and settingsPycharm shortcut keys for high frequency useCTRL+SHIFT+F10 running the current pageCtrl +/Comment (uncomment) the selected lineCtrl+shift+f Advanced FindShift + Enter to start a new lineTAB shift+tab
Built-in functionsNext, let's take a look at the built-in functions in Python. As of Python version 3.6.2, Python now provides us with 68 built-in functions altogether. They are all the functions that Python gives you to use directly. Some of these
Dictionary1. Dictionary creation? Assignment Creation Dictionary? Create a dictionary from the factory function# Assignment Creation Dictionary , Key-value, Key- value pair# Create a dictionary from the factory function# Create a dictionary using
First, built-in functions1, data type: Int,bool ....2, data structure: DICT,LIST,TUPLE,SET,STR3,reversed--retains the original list, returning an iterator to the reverse order=[1,2,3,4,5=reversed (l)print(L2)4,slice slicesL = (1,2,23,213,5612,234,43=
OS.GETCWD () Gets the current working directory, which is the directory path of the current Python script workOs.chdir ("dirname") changes the current script working directory, equivalent to the shell CDOs.curdir Returns the current directory: ('. ')
BreakThe break statement, like in C, is used to jump out of the nearest first level for or while loop.A loop can have a clause that executes when the loop iterates through the else entire list (for the for) or when the execution condition is false
Iterator iterator
iterative Protocols -as long as the __iter__ method is included, it is an iterative iterable
iterator Protocol -an iterator that internally contains the __next__ method and the __iter__ method
As long as
basic use of multiple processes1 subprocess examples of common functionsYou first define a program called by a child process that prints an output statement and gets command-line arguments 1 import sys 2 print ( called_function.py called,
Reprinted from https://q1mi.github.io/Blog/2017/07/10/about_jQuery/First, the introduction of jquery
jquery is a lightweight, multi-browser-compatible JavaScript library.
jquery simplifies JavaScript programming by making it easier for
defFun (A, B, *args):Print(a)Print(b)Print(args)Print("="*30) ret= A +b forIinchArgs:ret+=IreturnretPrint(Fun (1,2,3,4)) Results:12(3, 4)==============================101, 2 are assigned to a, B, and the remaining parameters are assigned to args in
Python section
Reverse a string and not use the inverse function
The number of numbers that can be divisible by 3 or 5 from 10 to 100.
What is Python? What is the benefits of using Python?
What is PEP 8?
What is pickling and unpickling?
If else can be represented by a simple ternary operatorIf 1 = = 1: name = ' Wupeiqi ' else: name = ' Alex '--》name = ' Wupeiqi ' if 1 = = 1 Else ' Alex 'Lambda can also be used to simplify expressions for functions# ######################
For the use of the listbox for the Python Tkinter component, see the following code for a demonstration:1 fromTkinterImport*2 3root=Tk ()4v=Stringvar ()5 #ListBox and variable binding '6Lb1=listbox (root,listvariable=v)7V.set (('Ten',' -',' -',' +',
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