1.基本的python语法

2.python爬虫

3.基本的数据分析

4.做网站

5.做机器学习

1.python简介:

Python 是一种解释型语言: 这意味着开发过程中没有了编译这个环节。类似于PHP和Perl语言。

Python 是交互式语言: 这意味着,您可以在一个Python提示符,直接互动执行写你的程序。

Python 是面向对象语言: 这意味着Python支持面向对象的风格或代码封装在对象的编程技术。

Python 是初学者的语言:Python 对初级程序员而言,是一种伟大的语言,它支持广泛的应用程序开发,从简单的文字处理到 WWW 浏览器再到游戏。

2.python基本的打印语句

(0)import this   引入python赞美之歌

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

(2)打印基本的语句:python2.x需要对汉字进行utf'-8编码,3.x不用

Python中默认的编码格式是 ASCII 格式,在没修改编码格式时无法正确打印汉字,所以在读取中文时会报错。

解决方法为只要在文件开头加入 # -*- coding: UTF-8 -*- 或者 #coding=utf-8 就行了(注意:#coding=utf-8 的 = 号两边不要空格。)

注意:Python3.X 源码文件默认使用utf-8编码,所以可以正常解析中文,无需指定 UTF-8 编码。

注意:如果你使用编辑器,同时需要设置 py 文件存储的格式为 UTF-8,否则会出现类似以下错误信息:

打印单条语句:

>>> print("hello,word")
hello,word
>>> print("你好世界")
你好世界

打印多条语句(一行多条语句需要用分号隔开)

>>> print("hello,word");print("你好,世界")
hello,word
你好,世界

最新文章

  1. ios 滚动视图响应touchesBegin,touchesEnd等方法
  2. 简单的Web留言本
  3. linux下多线程踩过的坑(不定更新)
  4. Js--AJAX的小知识(一):ajax的五种状态
  5. 创建多模块maven项目
  6. GetMemory 函数解析
  7. Mac截屏快捷键总结
  8. 「Foundation」集合
  9. 三分钟跑起jsblocks
  10. P1373 小a和uim之大逃离
  11. Windows程序设计学习笔记(一)Windows内存管理初步
  12. mac下使用mysql控制台命令行
  13. 查看win10系统产品密钥
  14. Python基础:五、Python程序的编写方式
  15. amcharts去除版权标志
  16. JS实现悬浮导航的制作(附源码)--web前端
  17. net core 获取网站目录
  18. Charles界面介绍及使用方法
  19. ADT Bundle下载和安装
  20. jquery中的replaceWith()和html()的区别

热门文章

  1. AutoLayout处理UITableView动态高度
  2. 【交互 细节题 思维题】cf1064E. Dwarves, Hats and Extrasensory Abilities
  3. Java--equals和 == 的比较和equals()、HashCode()的重写
  4. C#基础-判断语句
  5. python入门:py2.x里面除法或乘法这么写就可以计算小数点后面结果
  6. Vue之数据传递
  7. python学习博客推荐
  8. IDEA入门学习笔记1:资料收集
  9. eclipse使用技巧的网站收集——转载(三)
  10. nslookup、dig命令Linux安装包