合集-Python Script
摘要:
Python List Comprehensions All In One
列表推导式
python dynamic create list
python create list with for loop one line
enumerate, range, lambda, for...loop
阅读全文

摘要:
Python 3 List Type errors All In One
NameError: name 'List' is not defined
阅读全文

摘要:
Python Files All In One
open, read, write, append, binary, close
阅读全文

摘要:
Python exceptions All In One
ImportError: an import fails;
IndexError: a list is indexed with an out-of-range number;
NameError: an unknown variable is used;
SyntaxError: the code can't be parsed properly;
TypeError: a function is called on a value of an inappropriate type;
ValueError: a function is called on a value of the correct type, but with an inappropriate value.
阅读全文

摘要:
Python decorator method and decorator property All In One
修饰器/装饰器;静态方法;实例方法; 属性方法;
@classmethod decorator
@staticmethod decorator
@property decorator
property getter
property setter
阅读全文

摘要:
Python data hiding All In One
private data / private method
⚠️ 约定:class 里面使用单个下划线,表示私有的属性或私有的方法,实际上在 class 外面是可以访问的
阅读全文

摘要:
Python Magic Methods & Operator Overloading All In One
__init__ & __add__
阅读全文

摘要:
How to fix the for...in loop errors in Python All In One
Python 3
TypeError: string indices must be integers
阅读全文

摘要:
How to check function arguments type in Python All In One
Python & argument type check
阅读全文

摘要:
Python rpi_ws281x library All In One
Raspberry Pi & Python & WS2812B RGB LED Strip
rpi_ws281x
from rpi_ws281x import PixelStrip, Color, was
NeoPixel
adafruit-circuitpython-neopixel
RPi.GPIO
阅读全文

摘要:
Python function argument All In One
Python 函数参数
arbitrary positional arguments (`*args` 不定位置参数)
arbitrary keyword arguments (`**kwargs` 不定关键字参数)
function argument types
default arguments
keyword arguments
positional arguments
arbitrary positional arguments
arbitrary keyword arguments
阅读全文

摘要:
How to use the variable in Python String All In One
如何在 Python 字符串中使用变量
Python 字符串插值 All In One
Python 字符串中使用变量的 5 种方式
string.format
阅读全文

摘要:
How to change the default Python2 to Python3 on Linux All In One
在 Linux 中如何把默认的 Python2 更改为 Python3
.bashrc / .zshrc alias
symbolic link
符号链接 (软链接/硬链接)
阅读全文

摘要:
Python & PEP All In One
Python Enhancement Proposals / Python 增强建议
阅读全文

摘要:
How to use pip3 install the latest version package All In One
如何使用pip3安装最新版本包
阅读全文

摘要:
Python for loop with index All In One
带索引的 Python for 循环
enumerate
阅读全文

摘要:Python try...catch All In One
Python 异常处理
阅读全文
摘要:
Python OOP & Class private method All In One
Python Class private method
阅读全文

摘要:
Python range function All In One
range 函数
阅读全文

摘要:
pip3 & python3 -m pip All In One
rpi_ws281x
阅读全文
