好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Python基础(一)初识Python

一、Python介绍

Python是一门解释性的高级编程语言,具有可扩展性、可移植性、可嵌入性等优点,开发效率高但执行速度慢。

Python哲学

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. Readability counts. 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!

Python 解释器

第一个Python程序
 # 打印输出"Hello,World!"
print('Hello,World!') 

二、Python安装

在Windows平台下安装Python,直接next下一步完成安装

修改pip安装源

编辑配置文件pip.ini [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghua.edu.cn

安装Python虚拟环境

pip install Virtual envwrapper-win

创建虚拟环境 mk Virtual env env-name 删除虚拟环境 rm Virtual env env-name 查看虚拟环境 workon

查看更多关于Python基础(一)初识Python的详细内容...

  阅读:32次