search

目前可以在网上找到的入门教程大多是针对Python2的,Python3相对于2还是有很大改动的,所以入门难度就大一些。如果我想学习Python3,需要等到我把Python2的知识学完吗,还是直接入门Python3?

回复内容:

当然是直接学3

看 learning python 吧,书里涉及 py3 的都会提出来. 目前教程大部分是基于Python2的,但其中部分教程中会指出如果代码在3中运行需要注意或改动什么。但也有部分教程是基于Python3的,例如Head First Python(中文版)。如果你想学Python3的话,如果楼主英文好的可以直接看英文版的图书或资料,学3绝对没有任何问题,如果楼主英语和答主一样很烂的话,学Python2吧,为什么呢?第一,关于2的资料多,无论是中文还是英文。第二,现在很多东西都用Python2做的,有些东西不支持3,你在应用的时候会顺手的多。第三,学完Python2转到3也是很容易的。
上述内容是基于我自己学Python将近一个月的体会,目前研究过的书有《Python基础教程》、《与小卡特一起学Python》、Head First Python(中文版),对于笨方法学Python、Python简明教程和Python快速教程等在线教程均有实践(部分由于某些原因没有完全实践。)
送上部分Python在线教程地址:
Home - 廖雪峰的官方网站
Python快速教程
简明 Python 教程 看着别人写的py2的代码,脑补自动翻译成py3。无压力
有些库例如urllib什么的合并以后再py3的doc里面写的很清楚, 谷歌一下就知道了, 根本不花精力。
python2到3已经很简单了, 你要去学C的话, 呵呵, 祝你好运。。。 Wow, 这都 2014 快要结束了也,怎么还有人问这个问题 。。。

我是 5 年前开始学 Python 3 的,以下是我在学习过程中经历过的事情:

1. 发现用来解析 xls 文件的第三方组件不支持 Py 3, 于是用 土办法,另起进程
2. 然后发现没有支持 Py 3 的数据库接口可用,仍然土办法,另起进程
3. 然后又是画图的 matplotlib 不支持 Py 3, 仍然土办法,另起进程
4. Selenium(这是个神器) 不支持?另起进程

这么一路撑下来,终于拨云见日,现在一个一个都支持了,numpy、matplotlib、oursql、Selenium ...
而我的土办法竟然有些现在还在用,一直没有改正过来 。。。

我真想给 5 年前就选择 Python 3 的自己点个赞 ~

而说到怎么入门,话说我见到的许多人,想学什么东西时的第一反应都是要找入门教程,还得是中文的。

大家真的都把 官方文档 觑如无物吗?它甚至还有一个 Tutorial

最后我想鼓励一下题主,告诉你我体会到的 Python 3 比 Python 2 最大的改进

谢谢 ~ 给你推荐一本书《The Quick Python Book, Second Edition》,在亚马逊的评价很高。
The Quick Python Book, Second Edition: Naomi R. Ceder: 9781935182207: Amazon.com: Books我正是通过这本书入手Python3的。 pythondoc.com/ Python学习手册,书里每一章节基本上同时介绍了2,3两个版本的用法。想学哪个版本就侧重着看。
m.douban.com/book/subje 如果你要玩玩的话, 3 用得更爽一些,当然想 2 你就 “2” 呗! 装 3.X 学 2.X 也没问题,报错了就百度一下。
附主要变更Python3.x和Python2.x的区别 Python 教程(官方Tutorial翻译
Python教程 - 廖雪峰的官方网站
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Python vs. C  : Applications and Use Cases ComparedPython vs. C : Applications and Use Cases ComparedApr 12, 2025 am 12:01 AM

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

The 2-Hour Python Plan: A Realistic ApproachThe 2-Hour Python Plan: A Realistic ApproachApr 11, 2025 am 12:04 AM

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python: Exploring Its Primary ApplicationsPython: Exploring Its Primary ApplicationsApr 10, 2025 am 09:41 AM

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

How Much Python Can You Learn in 2 Hours?How Much Python Can You Learn in 2 Hours?Apr 09, 2025 pm 04:33 PM

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics in project and problem-driven methods within 10 hours?How to teach computer novice programming basics in project and problem-driven methods within 10 hours?Apr 02, 2025 am 07:18 AM

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

How to avoid being detected by the browser when using Fiddler Everywhere for man-in-the-middle reading?How to avoid being detected by the browser when using Fiddler Everywhere for man-in-the-middle reading?Apr 02, 2025 am 07:15 AM

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...

What should I do if the '__builtin__' module is not found when loading the Pickle file in Python 3.6?What should I do if the '__builtin__' module is not found when loading the Pickle file in Python 3.6?Apr 02, 2025 am 07:12 AM

Error loading Pickle file in Python 3.6 environment: ModuleNotFoundError:Nomodulenamed...

How to improve the accuracy of jieba word segmentation in scenic spot comment analysis?How to improve the accuracy of jieba word segmentation in scenic spot comment analysis?Apr 02, 2025 am 07:09 AM

How to solve the problem of Jieba word segmentation in scenic spot comment analysis? When we are conducting scenic spot comments and analysis, we often use the jieba word segmentation tool to process the text...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use