程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

python learning

編輯:Python
The best way to learn a new programming language is to learn by comparison. Let's take the python scripting language as an example.1. Understand the basic data types, basic syntax and writing habits of the languageBasic data types:python:Integer, Float String Boolean Null Variable Constant, List Tuple Dictionary CollectionPHP:Boolean, String, Integer, Float, Compound Types (Arrays, Objects, Resource Types)Basic syntax and structure: conditional judgments, loops, functions, object-oriented or notWriting habit: Compared to php, replace curly brackets with indentation, remove semicolons at the end of each line2. Learn basic string processing functions (find and replace, truncate and splice)python's find, join, split, replace,php's strpos, str_replace, str_split, etc.3. Learn basic array processing functions (count, insert, delete, intercept)python's len, insert, del, slice operations, etc.,php's count, array_push, array_pop, array_slice, etc.4. Understand the object-oriented or functional programming features of the language, mainly inheritance, polymorphism and anonymous functionspythonphppython anonymous functionphp anonymous function5. Understand exceptions, error handling, assertions, logging, debugging methods, and unit testingpython exceptionphp exceptionAssertions are mainly used in unit testing and will not be introduced here6. Understand basic input and output and file processing, input and output stream classespython:php:7. Understand how the language makes callback method callspythonphp  8. Familiar with serialization and deserialization, the role of serialization and deserialization is to transfer objects between different platforms;pythonphp9. Understand the organization mechanism of program code and executable code, runtime module loading, symbol lookup mechanismpython's import and php's autoload10. Familiar with and strengthen the thread, concurrent and asynchronous call mechanism, familiar with common frameworks and libraries11. If it is a scripting language, you need to understand its life cycle, and if it is another language, memory management is the top priority.In fact, the best way to learn is to practice, and applying what you learn is the fastest way to advance.
  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved