您的位置:首页 > 编程语言 > Python开发

A_Byte_Of_Python_1

2017-08-30 20:03 411 查看

A byte of Python

Success in life is a matter not so much of talent and opportunity as of concentration and perseverance.

​ —- C.W. Wendte

Chapter 2. Introduction

Features of Python

Simple

Easy to Learn

Free and Open Source

High-level Language

Portable

Interpreted

Object Oriented

Extensible

Embeddable???

Extensive Libraries

Chapter 4. First Steps

Vim

PyCharm

Emacs

Chapter 5. Basics

print("Hello, World!") #Note that print is a statement


Constant:

Numbers: (integers and float)

Strings: (immutable)

Single quote

double quote

triple quote: for multi-line string.

format method

format()

'{0:.3f}'.format(1.0/3)


'{0:_^11}'.format('Hello')


escape sequences:\\ \n \t

Raw string: no special processing

Variable:

Data Types:

numbers

strings

classes

Object

#程序可以换行
s = 'this is a string.\
This continues the string.'
print(s)
#same as
print(\
s)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python