Python is a programming language that lets you work quickly and integrate systems more effectively.
Whether you're new to programming or an experienced developer, it's easy to learn and use Python.
Python is powerful... and fast;
plays well with others;
is friendly & easy to learn;
There should be one -- and preferably only one -- obvious way to do it.
In Greek Mythology, Python was the serpent, sometimes represented as a dragon, living at the centre of the earth, believed by the ancient Greeks to be at Delphi.
- Imposed a Unicode model with broad consequences for strings, files, and libraries
- Elevated iterators and generators to a more pervasive role, as part of fuller functional paradigm
- Mandated new-style classes, which merge with types, but grow more powerful and complex
- Changed many fundamental tools and libraries, and replaced or removed others entirely
Install Python 3.6 for macOS:
tar -xvf Python-3.6.4.tar cd Python-3.6.4 ./configure make sudo make install /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install zlib sudo make install Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-9.0.1 setuptools-28.8.0
The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.
The Notebook has support for over 40 programming languages, including those popular in Data Science such as Python, R, Julia and Scala.
配合 Cmder 使用，完美。
Anaconda Distribution is a free, easy-to-install package manager, environment manager and Python distribution with a collection of over 720 open source packages with free community support.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
- Online Documentation Daemon Chinese Translation
- Brief Tutorial
- Standard Library
- Language Reference
#!/usr/bin/env python # -*- coding: utf-8 -*- python -m SimpleHTTPServer 8000 #!/usr/bin/env python3 # -*- coding: utf-8 -*- python -m http.server
- A Byte of python v191 3.x
- O'reilly Learning Python
- O'reilly Python Pocket Reference 5th Edition
- Manning The Quick Python Book
- Learn Python the Hard Way 2nd Edition
- Addison Wesley Programming in Python 3 2nd Edition
- Programming Python 4th Edition
- Springer Python Programming Fundamentals
- Apress Beginning Python From Novice to Professional 3rd Edition 2017
Introduction to Python
Intrigued by Python? Learn how to get started with this popular language, whether you’re new to programming or just new to Python. This engaging video course teaches you Python’s core concepts and data types through hands-on exercises, and delivers fun and useful projects so you can put everything together.
With an emphasis on code readability, Python enables programmers to express concepts in fewer lines of code than you can with many other languages. Open source developer Jessica McKellar helps you discover what’s possible with Python and provides the foundation you need to begin writing programs of your own.
- Set up a development environment with Python and a text editor
- Explore basic data types such as integers, strings, lists, and dictionaries
- Learn how looping lets you do lots of work with a little bit of code
- Gain access to more functionality in Python with modules
- Practice reading, writing, and running your first Python programs
- Navigate the command line for writing larger programs
- Write your own functions for encapsulating useful work
- Use classes to group, name, and reuse functions and variables
- Practice what you’ve learned with the state capitals quizzer and Scrabble cheater projects
Table of Contents
- What Can You Do With Python
- Environment Setup
- Python Basic Data Types
- Making Choices- booleans, if-elif-else, compound conditionals
- Lists: list, tuple, range enumerate
- Dictionaries: dict
- Modules: random
- Command Line Navigation
- Python Scripts and Files
- State Capitals Quizzer
- While Loop if for while with
- Reading From and Writing To Files files
- Files Practice- Flashcard Quizzer
- Functions Practice - Wordplay
- Scrabble Cheater
- Course Closing
Let's Dive into
网易的两大游戏客户端引擎，NeoX 和 Messiah，都是使用 Python 作为脚本语言的。具体来说，服务器端可以说是完全Python，毕竟能够热更新的Python可以不停服！当然游戏的客户端核心引擎部分，还是用C++，一些类似基本渲染还是用C++来实现的。
- 使用 sudo 命令，管理员用户密码不能为空。但是安装并不顺利，提示缺少 zlib。通过 HomeBrew 安装 zlib，Xcode Command Line Tool 版本过低，需要升级到 7.2。