对于几乎是零基础的人,直接学 Python 编程合适吗?
听说 Python 非常简单易学。
回复内容:
首先声明:我的入门语言是C。我赞成把Python作为入门语言:
- 语法简单明了。第一门语言,其实就是语法+Flow control,而Python的语法简单,代码可读性高,容易入门。
- Python的哲学是「做一件事情应该只有一种最好的方法」,对于初学者规范自己的学习有很大的帮助,同时也帮助初学者能够读懂其他人的代码(相比Perl的代码简直没法看)
- 养成良好的习惯。Python对于代码的要求严谨,特别是缩进(Indentation),对于初学者养成良好的代码习惯很有帮助。
- Python的语法设计非常优秀(反面例子PHP),思想也比较现代,可以更快的理解现代编程语言的一些思想。
- Python仍然是传统基于Class的OO(对比Javascript基于prototype的OO),和Java,C#,Ruby一样,比较大众。从Python去学Design Pattern也是比较合适的。
- Python的内置数据结构清晰好用(C提供的略少,PHP的略乱),同时Library比较多,优秀的代码很多(相比PHP就有许多烂的代码,误导新人)。
- Python免费的书很多(英文),可以找到许多资料啃。同时(国外)社区比较集中,有问题可以向高手问。
- Python在其他领域,比如科学计算等等有广泛的运用,对于学一门语言作为工具来说,Python很合适。
说说缺点把:
- 语法:这是一把双刃剑,虽然Python语法简介优雅,但是再去学C的时候,很可能会出现忘掉「;」等等问题(我自己没试过,猜的)。
- 国内应用有限:虽然Python受到了追捧,尤其是国外,但是在国内来说,应用还是有限,纯粹靠Python吃饭要比C/PHP难一些。
- 动态(dynamic-typed):做开发当然动态语言很舒服,但是如果初学一门动态语言,很可能会忽视掉一些基础。
- 版本:2.7和3.0是不兼容的,对于初学者可能会造成一些困惑。
想了半天就想了这么点缺点,总体来说优点 > 缺点。 非常适合,理由什么的我就不多说了,网上到处都是。
我就说一个事实:我读书的时候实验室的所有姑娘们,都学会了Python。 我作为一个真正的零基础,在2012年初,抱着无知的勇气,开始学习python。
我犯的最大错误在于,选择了语言,却没有选择自己想做什么。当时看完了Learn python the hard way和一本600余页的书,一头雾水不说,还是什么都不会做。对,特别是那本书,上面写的大部分东西都不知道是干嘛使的。
然后此事就作罢了。
今年,突发奇想,是不是可以做个网站玩。然后翻出django book,看了几章后,茅塞顿开,以前看的600多页一夜之间就懂了大半。
对于我这种小白,python的简单反而是个障碍。
强烈建议,想清楚做什么,再决定学什么。 唯一的问题在于,你先从Python入手,用熟了以后再去接触C/C++,你可能会有抵触情绪...好比人走出自己的舒适区
而先经受了C/C++的洗礼再接触到Python的话就会觉得进入了一个全新的世界,爽得一B 我们学校本科编程入门(教不会编程的人编程)就是用Python。
据说是因为python的syntax 比较简单和简洁,初学者不会被一些很细节的东西(语法等)绑住了手脚,从而让他们更容易理解编程里面的很多概念和更大的东西。
那门课貌似每周三小时,历时四个月。到三个半月的时候,就可以写一些小项目了(前三个项目更像script,最后一个项目是自己设计和写一个text-based 游戏,涉及到 Tkinter,很有趣)。其中有很多学习金融,精算,生物,甚至艺术的学生学习,所以说的确很简单易学。
但是因为Python语法简单,所以很多概念还没有。所以建议掌握了Python一阵可以开始Java。
我们学校大二学软件编程什么的,就是Java了。然后下学期学计算机系统就是Linux, 和 C了。
综上我建议Python -- > Java -- > C/C++ 虽然我也是从C一路学上来的,并且现在吃的是C这碗饭。但我也认为从Python开始是个不错的选择。
分析计算机问题,追求的就是自顶向下,逐步求精。而我们日常教学中普遍采用的C → C++ →JAVA 则完全是反其道而行之,使人重细节而轻框架,在无谓的地方做过多纠缠。
PS:斯坦福的计算机工程专业现在也是从Java开始讲起,也许有朝一日,这门课会从Python/Ruby/Perl/Groovy开始吧。 Python相对来说学习比较简单,比较容易入门。想要快速入门可以按照下面的方法去做:
1. 发现自己的兴趣,比如:你想做一个小游戏,那好,就以这个为目标去研究python gui
2. 多做实例,编程实战的重要性不用我说了吧。
3.找一个好的python学习社区和群,和网友交流学习经验,探讨遇到的问题。顺便给你推荐几个:
PythonTab:Python中文开发者社区门户 最好的Python中文网站;
Python基础教程|Python教程|Python入门
http://bbs.pythontab.com python论坛 说到简单易学,C# 不比 Python 难学。
而从 .NET 平台入门折腾的时候还要少些。
但是学 Python 你可以接触一些 C# 以外的编程思维。
-------------------------------------------------
上面是题外话。
不管有没有基础,直接学 Python 都是合适的。 我是先学的C#,大约一年以后才学的Python。我觉得先学Python能够让你更好的理解编程这件事情。
1)Python的代码非常接近人类语言,读起来像诗歌一样妙曼。
2)Python的数据结构足够新手使用,GC机制也比较完善。
3)Python可同时用于构建C/S应用和B/S应用,一次学习,两面使用。
4)大量开源Python类库可用于编写各种短小的应用,降低初学者的挫败感,另外,开源类库也是最好的教科书。
等等等等……
总之,我建议编程初学者先学Python,然后再考虑C#、Java中的一门,最后再学习C\C++。当然,有很多计算机专业的人会反对这种路线,并认为是本末倒置的。 合适。 但不是最好的选择。建议从C开始学。
Python看似简单, 但是Python的简单不是C那样的简单, Python的简单是把复杂的东西包装了起来, 给学习者一种看上去很简单感觉。 这带来的坏处就是你确实能用它做事, 但当你接触更多的概念的时候, 你会发现要学的东西很多,这里一些那里一些。比如包装器,比如惰性求值,比如yield。
Python这门语言是如此的好用, 但是建议先学C再学一门FP语言,然后开始享受Python。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PS "Loading" problems are caused by resource access or processing problems: hard disk reading speed is slow or bad: Use CrystalDiskInfo to check the hard disk health and replace the problematic hard disk. Insufficient memory: Upgrade memory to meet PS's needs for high-resolution images and complex layer processing. Graphics card drivers are outdated or corrupted: Update the drivers to optimize communication between the PS and the graphics card. File paths are too long or file names have special characters: use short paths and avoid special characters. PS's own problem: Reinstall or repair the PS installer.

A PS stuck on "Loading" when booting can be caused by various reasons: Disable corrupt or conflicting plugins. Delete or rename a corrupted configuration file. Close unnecessary programs or upgrade memory to avoid insufficient memory. Upgrade to a solid-state drive to speed up hard drive reading. Reinstalling PS to repair corrupt system files or installation package issues. View error information during the startup process of error log analysis.

"Loading" stuttering occurs when opening a file on PS. The reasons may include: too large or corrupted file, insufficient memory, slow hard disk speed, graphics card driver problems, PS version or plug-in conflicts. The solutions are: check file size and integrity, increase memory, upgrade hard disk, update graphics card driver, uninstall or disable suspicious plug-ins, and reinstall PS. This problem can be effectively solved by gradually checking and making good use of PS performance settings and developing good file management habits.

The article introduces the operation of MySQL database. First, you need to install a MySQL client, such as MySQLWorkbench or command line client. 1. Use the mysql-uroot-p command to connect to the server and log in with the root account password; 2. Use CREATEDATABASE to create a database, and USE select a database; 3. Use CREATETABLE to create a table, define fields and data types; 4. Use INSERTINTO to insert data, query data, update data by UPDATE, and delete data by DELETE. Only by mastering these steps, learning to deal with common problems and optimizing database performance can you use MySQL efficiently.

The key to feather control is to understand its gradual nature. PS itself does not provide the option to directly control the gradient curve, but you can flexibly adjust the radius and gradient softness by multiple feathering, matching masks, and fine selections to achieve a natural transition effect.

MySQL has a free community version and a paid enterprise version. The community version can be used and modified for free, but the support is limited and is suitable for applications with low stability requirements and strong technical capabilities. The Enterprise Edition provides comprehensive commercial support for applications that require a stable, reliable, high-performance database and willing to pay for support. Factors considered when choosing a version include application criticality, budgeting, and technical skills. There is no perfect option, only the most suitable option, and you need to choose carefully according to the specific situation.

MySQL performance optimization needs to start from three aspects: installation configuration, indexing and query optimization, monitoring and tuning. 1. After installation, you need to adjust the my.cnf file according to the server configuration, such as the innodb_buffer_pool_size parameter, and close query_cache_size; 2. Create a suitable index to avoid excessive indexes, and optimize query statements, such as using the EXPLAIN command to analyze the execution plan; 3. Use MySQL's own monitoring tool (SHOWPROCESSLIST, SHOWSTATUS) to monitor the database health, and regularly back up and organize the database. Only by continuously optimizing these steps can the performance of MySQL database be improved.

The loading interface of PS card may be caused by the software itself (file corruption or plug-in conflict), system environment (due driver or system files corruption), or hardware (hard disk corruption or memory stick failure). First check whether the computer resources are sufficient, close the background program and release memory and CPU resources. Fix PS installation or check for compatibility issues for plug-ins. Update or fallback to the PS version. Check the graphics card driver and update it, and run the system file check. If you troubleshoot the above problems, you can try hard disk detection and memory testing.
