python统计pdf下载_python科学计算指导.pdf

An introduction to Python for scientific computing

Table of contents

Table of contents 1

Overview 3

Installation 3

Other resources 4

Interactive interpreter 5

Everything is an object 7

Basic types 7

Python as a calculator 8

Boolean values and comparison operators 9

Variable assignment 10

Strings 11

Special characters in strings 12

String formatting 12

Lists 15

Accessing list elements 16

List comprehensions 18

List operations and functions 19

Tuples and immutable versus mutable objects 21

Assignment and name binding 22

Multiple assignment 26

String functions and manipulation 27

Dictionaries 29

If statements 31

For loops 33

While loops 37

Functions 38

© 2014 M. Scott Shell 1/63 last modified 6/17/2014

Optional arguments in functions 40

Function namespaces 41

Functions as objects 42

Function documentation 43

Writing scripts 44

Modules 45

Standard modules 47

Reading from files 48

Writing to files 51

Binary data and compressed files 52

File system functions 54

Command line arguments 56

Classes 57

Exceptions 59

Timing functions and programs 61

© 2014 M. Scott Shell 2/63 last modified 6/17/2014

Overview

Python is an extremely usable, high-level programming language that is quickly becoming a

standard in scientific computing. It is open source, completely standardized across different

platforms (Windows / MacOS / Linux), immensely flexible, and easy to use and learn. Programs

written in Python are highly readable and often much shorter than comparable programs

written in other languages like C or Fortran. Moreover, Python comes pre-loaded with

standard modules that provide a huge array of fu

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值