1. ReflectionMapping or modifying the state, properties, methods of a program while it is running through a stringGetAttr (OBJ,NAME_STR): Gets the memory address of the corresponding method in the Obj object according to the string name_strHasttr
" " #1, using while loop input 12345689n=1while n"' "#2, 1-100 and n=1sum=0while n" "#3, enter all the odd n=0while within 100 n'#4, enter all even N=1while N "Meet Python on the first day
CodingUnicode, universal code, Unified code, for each language of each character set a unified and unique binary encoding, to meet cross-platform, cross-language text conversion;Utf-8-8-bit Unicode Transformation Format, variable-length character
Iterator 1. What is an iterative objectstrings, lists, tuples, dictionaries, and collections can all be used for loops, indicating that they are all iterative. 2. Can iterate protocola requirement that can be iterated over is called an iterative
#本文是在Windows环境下, a UNIX system should have 2 more things to set up.(i) designing Web applications with MVCFollow model-View-controller (Model-view-controlle)Model: Code that stores web app dataView: Formatting and displaying code for the Web App
1 ImportHMAC2 ImportOS3c = Os.urandom (24)#returns a random 32-byte binary number that can be applied to password-related aspects4Name = b'Liuyk'5h =hmac.new (name,c)6Digest = H.digest ()#This returns a string containing 8-bit data. The Object is7
Detailed explanation of Python output commands and python commands
Create the main. py file and paste the following code
Right-click Debug 'main' and a prompt like ImportError: No module named 'bottle' will appear in the Debug window below,
The simple principle and implementation code of the python online compiler, And the python Compiler
Let's take a look at the effect (a simple ONE ):
Principle: write the code data of the post request to a file on the server, and then execute the
The road to wudao-the middle of the five-day refining phase, the road to five-day
High-order function: the function itself is passed to another function as a parameter, and a function is returned after running.
Recursion: other functions can be
10. Exception Handling, custom exceptions, assertions, and Exception Handling assertionsWhat is an exception:
When a program encounters some abnormal problems, it throws an exception: for example, int () can only process objects that can be
Basic data type (2), data type (2)I. List
# Create a list # Method 1: name_list = [1, 2, 3, "reese", "neo"] print (name_list) # Method 2: v = list ([1, 2, 3, "reese", "neo"]) print (v)
Supported basic operations:
Index
Slice
Modify
Delete
Loop
Python 3.x study note 12 (reflection and exception), python3.x
1. ReflectionUse string ing or modify the status, attributes, and methods when the program is running
Getattr (obj, name_str): obtains the memory address of the corresponding method in
Use ten images to illustrate the TensorFlow Data Reading mechanism (with code) and ten tensorflow
In the process of learning TensorFlow, many friends report that reading data is hard to understand. Indeed, this official tutorial is relatively simple,
Python obtains the file name in a specified folder.
This document uses the OS. walk () and OS. listdir () methods to obtain the file name in the specified folder.
I. OS. walk ()
The walk () function in the module OS can traverse all files in the
9.1.1, private variable, private method, 9.1.1 private variable methodPrivate variable, private method:
Python is privatized to plan private attributes and avoid unrelated access! I have a wife. You cannot know who my wife is. You only need to
Three methods of python string connection, their efficiency, and applicable scenarios are described in detail.
There are generally three methods to connect python strings: Method 1: directly connect to website = & 39; python & 39; + & 39; tab & 39; +
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