Lists List
Used to store multiple data
Check and delete and change
list ()/list ()
Set Set
Used to store multiple data
Check and delete and change
set ([])/set ()
1. Combination data Type--tuple (tuple)
The meaning of appearance:
In order to show
#coding =utf8
'
tuple is another type of container that is very close to the list. A
tuple is an immutable type that cannot be modified once it is created.
because of this feature, a tuple can be a key in a dictionary.
when working with a group of
Python functions are simpler than other languages, do not need pointers, and do not have parameter types, as long as the formal parameters can be written.
A small example realizes the addition of two numbers
def fun (a,b):
c=a+b
Print (c)
Import CSV from
matplotlib import Pyplot as PLT from
datetime import datetime
filename= "sitka_weather_2014. CSV with
open (filename) as F:
Reader=csv.reader (f)
Header_row=next (reader)
dates,highs,lows=[],[ ],[] for
row in reader:
Reference:
http://blog.csdn.net/nieson2012/article/details/51279332
Http://www.cnblogs.com/wentingtu/archive/2011/12/22/2297405.html
Http://www.cnblogs.com/pinard/p/6156009.html
Algorithm Description:
1. Load data (training data and test data),
1. Szinput = input ("
2. ninput = Int (szinput) #字符串转换成数字3. While elseContinue #终止当前循环Break #终止循环4. and #条件与5. Pycharm Installation and SetupFont: 28 line number Mouse changes font size: Mouse->editor->general->change font size (Zoom) with
Reprint please indicate the source: http://blog.csdn.net/yiliumu/article/details/21335245
First, let's take a look at how to get the content of a Web page if it's a normal behavior of people. (1) Open the browser, enter the URL, open the source page(
Cases:
def student_info (A,number=0000,*args,**qwer)
General parameters, default parameters, indefinite length parameters, indefinite long keyword parameters
Default parameter: Indicates that when this function is called, it selects the default
Now the internet giants have been transferred to the field of artificial intelligence, and the preferred programming language for artificial intelligence is Python, and the future is obvious. So the question comes, want to learn Python,python
Import sys
Reload (SYS)
sys.setdefaultencoding (' Utf-8 ')
The source of this idea is that I was always defeated in a big V's grab couch to give prizes, and was unwilling.
So I want to write a micro-blog Early Warning applet
After trying to find in
This article turn from click to open link
There are four forms of function pass parameters in Python
FUN1 (A,B,C)Fun2 (a=1,b=2,c=3)FUN3 (*args)Fun4 (**kargs)
Four of the most common is the first two, basically the general point of the tutorial will
According to the October 2017 latest mobile phone number is the code, is the following:
(13\d|14[579]|15[^4\d]|17[^49\d]|18\d) \d{8}
#-*-Coding:utf-8-*-
import random,re
def create_phone ():
# second digit
second = [3, 4, 5, 7,
The article for reprint, thank you predecessors of the collation and efforts
Analysis of 10.1.1 page sliding principle
In the page to find the chapter of the slide to talk about the sliding knowledge point, just do not know whether we have serious
The article for reprint, thank you predecessors of the collation and efforts
8.1 What is the encapsulation of a function
The package of functions on the textbook is too official, we have to put the function of the encapsulation is to lazy to some
This chapter focuses on the content of document processing, including downloading files to a folder, and reading documents and extracting data. We will also introduce different encoding types of documents so that programs can read HTML pages that
The reversed () function is the iterative child that returns the reverse access of the sequence seq. Parameters can be lists, tuples, strings, and do not change the original object.
1 "parameter is a list
>>> l=[1,2,3,4,5]>>> ll=reversed (L)>>> L[1,
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