Title: Python achieves three landingsDo not rush to write three times immediately, it is necessary to simplify the complex procedures, you must step-by-step to expand, so as to ensure that there will be no error.Step one: Achieve a simple one-time
Tag:details copy logic judgment ant ping print sel net usage Python if not determines whether the case is none if the Xif x is Noneif isn't x is none if the X is not none "is the best way to do it, clear, without errors, and
is also essentially another form of representation of a function, enriching its functions for other functions, decorating other functions, additional functions
Does not change the source code of the decorated function, and does not change the way
Getting Started with Linux commands
pwd Displays the current directory
CD switch directories such as: CD/switch to root directory
CD.. Switch to Parent directory
ls displays all files and folders in the current directory
ls-l lists the
Python27win32 installation: https://www.python.org/downloads/Download the 2.7 installation in the next step: Configure the Python system environment variable: NEW: The Python_home value is: C:\python27 Path Front
These days began to learn python, encountered some problems, but also solved some problems.where if __name__ = = ' __main__ ': This sentence estimates a lot of beginners like me are superficial understanding.Here's an explanation:1:__NAME__ is a
Lebyan: Make your code more concise>>> [i*2 for I in range (10)][0, 2, 4, 6, 8, 10, 12, 14, 16, 18]Generator is to save memory space, the generator will be called when the corresponding data generated, not called when only allocating memory;There is
1 time.sleepImport timeFor I in range (5):Print (i)Time.sleep (10)2 with ShedImport TimeImportsched Schedule=Sched.scheduler (Time.time, Time.sleep)deffunc (STRING1,FLOAT1):Print(" now is", Time.time (),"| output=", STRING1,FLOAT1)Print(Time.time ())
Print ("Hello word!")# for I in range (1, 10):# for J in range (1, 10):# Print (J, "X", I, "=", I * j, "\ T", end= "")# If i = = J:# print ("")# Break # _user = "Zhang"# _passwd = "123"# for I in range (3):
Weekend, but I'm not fit to have a weekend ah, 7.9 awake, continue to look at Python, yesterday downloaded a tool pycharm, this tool and idea is a family. Use almost, today continue to look at the foundation.Write format: Python is particularly
Recently want to put the original picture and processed pictures together to observe the changes in the process of the picture. But online and find useful sample code, so stick it out and share it with you.ImportNumPy as NPImportMatplotlib.pyplot as
Configparser ModuleUsed to generate and modify common configuration documents, the name of the current module is changed to Configparser in the Python 3.x version.Common document formats are as follows[DEFAULT] Serveraliveinterval = 45Compression =
Introduction to int internal functionsYou can view all the functions inside an int by using the Dir (value of type int) or by CTRL + click Int. Internal functions are many, but many of the internal functions are not commonly used, the following are
in Python, there are four types of basic operations for a file:1. Open Filefile_obj = open ("File path", "mode")the commonly used open file modes are:r: Open the file as read-only. The pointer to the file will be placed at the beginning of the file.
The Python language does not resemble Java, JavaScript, and other languages:What are the terms of the sentence? Result of the condition being true: the result when the condition is falseSuch a three-mesh operation, but Python also has its own
Python functionsFirst look at the following code:def welcome_info (): " Show welcome message " Print ("Hello world! " ) return 0As in the code, a function is defined.The result after the call is:Welcome_info () # call function Hello
Install mongodb 02 and chatterbotmongodb in ChatterBot linux
Current Environment: centos 6.9
Mongodb version mongodb-linux-x86_64-3.4.4.tgz
Use link tool: studio-3t-x64.msi.zip
First, install mongodb:
1. Put the downloaded mongodb-linux-x86_64-3.4.4.
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