OutlineI. Introduction of PythonGuido van Rossum The benevolent dictatorABC Modula-3 Unix Shell CBorn during Christmas 1989October 16, 2000 2.0December 3, 2008 3.0 discard compatibility with Python2, now exists python2.0 and python3.0 parallel, 40%
In the group often hear such disputes, some people are open to ask questions, some people boast because this is said Python spicy chicken. And the core of the argument is that Python's multithreading at the same time will only have one thread
1. Thread Mode code#!/usr/bin/python#_*_coding:utf-8_*_import threadingimport timedef producer (): print ' chef : and other people to buy steamed buns ... ' event.wait () event.clear () print ' Sb is coning for baozi ' print '
1, using the function to implement the producer consumer model(1), the source code is as follows:#!/usr/bin/python#_*_coding:utf-8_*_import threadingimport timeimport queueimport Randomdef producer (Name, que): while true: if que.qsize ()
1 Read txt file. Python's file reads and writes are almost as easy to read as C.The first is to read the fileFirst get the file name, then open the file by opening function, read the contents of the file line by the For loop#!python file by Ninahao 1
Property (Fget=none, Fset=none, Fdel=none, Doc=none)Property Attributefget isA function to being used forGetting an attribute value, andLikewisefset isa function forSetting andFdel a function for del'ing, anAttribute. Typical use isTo define a
Note: Please see https://docs.python.org/3/library/functions.html#next for more details.One all (), any ()false:0, Noe, ', [], {}, ()All () it's true.Any () One is true, all is trueTwo Bin (), Oct (), Hex ()Bin (), receive decimal turn binary
"Prettytable" of the Python moduleAbstract: Python uses the prettytable module to output output in a tabular fashion. (often used with Python to manipulate databases)1. Check if the system has prettytable module installed2. Download Prettytable
English documents:
Hex (x)
Convert an integer number to a lowercase hexadecimal string prefixed with ' 0x ' for example
If X was not a Python int object, it had to define an __index__ () method, which returns an integer.
Description
1. function
1.python Encyclopedia
Python is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum in 1989, and the first public release was released in 1991.
Python is purely free software, and the
Nothing to do, want to learn python, at the beginning of October set up a good Ubuntu environment, with Ubuntu 16.04 32-bit +sublime Text3, Lightweight programming environment, feel comfortable to use up. Also on a continuous study of Python's
dictionary 1. Dictionary definitions and Rules:Definition: {key1:value1,key2:value2}Key definition rules: 1, must be immutable (numbers, strings, tuples); 2, must be unique,Definition rule for value: any typeCharacteristics: 1, can store multiple
Python module: logging and python module loggingLogging Module
Many programs need to record logs, and the information contained in the logs has normal program access logs, and may also have errors, warnings, and other information output, the logging
Python Development Program: Student Management System (mysql), pythonmysql
Topic: Student Management System
Requirements:
User Roles, lecturers, and trainees. After logging on to a user, you can perform the following operations based on different
Python note-1, python note
OS module Description: the python OS module contains common operating system functions.
OS. access (path, mode) # verify the permission modeOS. chdir (path) # change the current working directoryOS. chflags (path, flags) #
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