Code Monkey home page Code Monkey logo

python-notes's Introduction

python-notes

Python Notes 學習筆記 📝

介紹

有時候想找一個東西(寫法),但當下卻忘記關鍵字,所以整理一篇學習筆記,要找資料的時候也比較方便。

有些是網路上找的範例,然後自己再修修改改,或是去參考一些 Python-Patterns , Python Anti-Patterns 。

範例程式會盡量遵守 PEP 8 -- Style Guide for Python Code

歡迎大家一起討論~

筆記會持續更新~

筆記

attribute_obj.py - setattr() , getattr() , hasattr()

check_is_in_list.py - 檢查目標是否在 list 裡

datetime_tutorial.py - datetime , monthrange , timestamp

defaultdict_tutorial.py - defaultdict

counter_tutorial.py - counter

namedtuple_tutorial.py - namedtuple

dictionary_using_items.py - dictionary.items()

dictionary_get.py - dictionary get()

set_tutorial.py - set tutorial

dictionary_update.py - dictionary update()

tuple_tutorial.py - tuple

eafp.py - EAFP coding style

enumerate_tutorial.py - enumerate

filter.py - filter

format.py - format

function_default.py - function default value

isdigit.py - isdigit()

isinstance.py - check type

join.py - join

json_tutorial.py - json.loads()

kwargs.py - **kwargs , *arg - youtube tutorial - What is **kwargs *args

lambda.py - lambda

list_tutorial.py - list tutorial

loop_if_else_break.py - if not add break , will run more meaningless loop

map.py - map

OrderedDict_tutorial.py - OrderedDict

parse_dateutil.py - dateutil.parser

property_decorator.py - property_decorator

raise_an_exception_from_function_call.py - it is better to raise an exception that can be caught by the caller instead.

range.py - range

reduce.py - reduce

setdefault_tutorial.py - setdefault

sort.py - sort

sorted.py - sorted

iter_tutorial.py - iter tutorial

__iter__tutorial - __iter__ tutorial

yield_tutorial.py- yield tutorial

yield_from_tutorial.py- yield from tutorial

Enum_tutorial.py- Enum tutorial

__str__tutorial.py - __str__ tutorial

strtobool_tutorial.py - strtobool

underscore_variable.py - underscore variable

use_unpacking.py - use unpacking

using_a_mutable_default_value_as_an_argument.py - Be careful with mutable default arguments ( lists or dictionaries ) - youtube tutorial

zip_tutorial.py - zip

staticmethod_tutorial.py - staticmethod tutorial

classmethod_tutorial.py - classmethod tutorial

decorator_tutorial.py - decorator 裝飾器

context_manager_tutorial.py - context manager

configparser_tutorial - ConfigParser tutorial,可參考 https://docs.python.org/3/library/configparser.html

__len__tutorial.py - __len__ tutorial

decimal_tutorial.py - decimal tutorial

copy_tutorial.py - copy_tutorial

sum_tutorial.py -sum_tutorial

built-in-functions_tutorial.py - Built-in Functions tutorial

reduce_use_for_loop_tutorial_1.py - reduce_use_for_loop_tutorial_1

reduce_use_for_loop_tutorial_2.py - reduce_use_for_loop_tutorial_2

nested_loop_tutorial.py - nested_loop_tutorial

dict.fromkeys_tutorial.py - dict.fromkeys tutorial

escape_tutorial.py - html.parser ( escape ) tutorial

pickle_tutorial.py - pickle tutorial

zipfile_tutorial.py - zipfile tutorial

unicodedata_tutorial.py - unicodedata ( control character ) tutorial

translate_tutorial.py - translate tutorial

re_tutorial.py - re tutorial

is_integer_tutorial.py - float is_integer tutorial ( TestCase )

remove_trailing_zeros_tutorial.py - decimal remove trailing zeros tutorial ( TestCase )

itemgetter_tutorial.py - itemgetter tutorial

groupby_tutorial.py - itertools groupby tutorial

groupby_tutorial_find_consecutive numbers.py - find consecutive numbers in list by groupby tutorial

python-decouple-tutorial - python decouple tutorial

dj_database_url_tutorial - dj-database-url tutorial ( for django )

pandas_tutorial - pandas tutorial

random_tutorial.py - random tutorial

__call__tutorial.py - __call__ tutorial - youtube tutorial - What is the __call__ in python

queue_tutorial.py - queue tutorial

str_startswith_tutorial.py - str.startswith() tutorial

logging_tutorial.py- logging tutorial

觀念

python_circular_import - youtube tutorial - What is Python Circular Imports

What happens when you type an URL in the browser and press enter - youtube tutorial - What happens when you type an URL in the browser and press enter

cap theorem - youtube tutorial - What is CAP theorem

what_is_the_python_decorator

what_is_the_python_property

what_is_the_classmethod_and_staticmethod

what_is_the_functools.lru_cache

what_is_the_singledispatch

data structure

linked list

如何使用

基本上,每個 python 檔案都可以直接執行。

python xxxx.py

範例

python defaultdict_tutorial.py

執行環境

  • Python 3.6.4

Reference

Donation

如果有幫助到您,也想鼓勵我的話,歡迎請我喝一杯咖啡:laughing:

alt tag

贊助者付款

License

MIT license

python-notes's People

Contributors

twtrubiks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.