2022年4月20日 星期三

Python 筆記

10 reasons why Python is better than C#

已經會C#,這篇是很好的起點,知道 Python 和C#有何不同,好在哪裡,要補K哪些文件。

The Python Standard Library

要補K那些?就看這簡潔又完整的官方文件。

Python 程式慣例與風格

每種程式都有它的風格和慣例,寫 Python 就用 Python 的慣例。透過好/壞寫法的比較,清楚該怎麼寫才是 Python style。

大多數情況下,我們是「讀」程式(code is read much more often than it is written),程式好讀對生產力大有幫助。

Switch to Python

已有程式經驗,切換至 Python 的步驟:

  1. The Basic Python Syntax
  2. Python args and kwargs: Demystified – Real Python
  3. Primer on Python Decorators – Real Python
  4. Python's Instance, Class, and Static Methods Demystified – Real Python
  5. Python Virtual Environments: A Primer – Real Python
  6. Python REST APIs With Flask, Connexion, and SQLAlchemy – Real Python
Real Python 網站很棒的地方是,Python 教學之後,還會提供「Real World Examples」,介紹實務上的用法及例子!

Python學習地圖

  • Python notes for beginners
    1. Python basic tutorial
    2. Syntax
    3. Statement, Indentation, and Comments
    4. Variables and Datatypes
    5. Operators
    6. Numbers
    7. Strings
    8. Data structure
    9. List
    10. Tuples
  • Python notes for intermediates
    1. Module
    2. Classes
    3. Methods
    4. Iterators
    5. Decorators
    6. Generators
  • Python notes for advanced learners
    1. Web framework
    2. Machine Learning
    3. Deep learning
    4. Artificial Intelligence
    5. Relational Database

避免錯誤

Why Python?

最後來點輕鬆的。

Guido van Rossum 命名靈感來自1970年代英國一個超現實/荒誕幽默喜劇團體 Monty Python。 Python 範例程式中的變數名稱叫 spam、eggs,也是在向他們的短劇 SPAM 致敬。

Monty Python 短劇: SPAM


沒有留言:

張貼留言