A_Byte_Of_Python_1

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)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值