自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

7921 Star!Python學(xué)習(xí)的必備法寶,隨查隨用,太方便了吧

新聞 前端
近日,有一叫Python-cheatsheet項(xiàng)目在Hacker News、Reddit、Github等網(wǎng)站上成功引起了廣大程序員的注意。

 [[271606]]

大多數(shù)的cheatsheet都是簡單的語法規(guī)則列表,如果你手頭有一份cheatsheet會(huì)讓你的工作效率大大提升。

近日,有一叫Python-cheatsheet項(xiàng)目在Hacker News、Reddit、Github等網(wǎng)站上成功引起了廣大程序員的注意。

Python-cheatsheet是一份超全的Python速查表,最大的特點(diǎn)就是你無需安裝和配置,在線就能使用,內(nèi)容十分全面 

7921 Star!Python學(xué)習(xí)的必備法寶,隨查隨用,太方便了吧

目前,python-cheatsheet已經(jīng)過在Github上獲得 7885 個(gè)Star,1572 個(gè)Fork(Github地址:https://github.com/gto76/python-cheatsheet 

7921 Star!Python學(xué)習(xí)的必備法寶,隨查隨用,太方便了吧 

清單的開頭就對(duì)這份內(nèi)容進(jìn)行一個(gè)梳理,可以看出內(nèi)容涵蓋:容器、類型、語法、系統(tǒng)、數(shù)據(jù)、庫,以及Advanced Python等。你只要點(diǎn)擊相關(guān)知識(shí)點(diǎn),就會(huì)跳轉(zhuǎn)到相關(guān)的詳情頁,下面以Main和List為例

Main

if __name__ == '__main__':     # Runs main() if file wasn't imported.
    main()

List

<list> = <list>[from_inclusive : to_exclusive : ±step_size]

<list>.append(<el>)            # Or: <list> += [<el>]
<list>.extend(<collection>)    # Or: <list> += <collection>

<list>.sort()
<list>.reverse()
<list> = sorted(<collection>)
<iter> = reversed(<list>)

sum_of_elements  = sum(<collection>)
elementwise_sum  = [sum(pair) for pair in zip(list_a, list_b)]
sorted_by_second = sorted(<collection>, key=lambda el: el[1])
sorted_by_both   = sorted(<collection>, key=lambda el: (el[1], el[0]))
flatter_list     = list(itertools.chain.from_iterable(<list>))
product_of_elems = functools.reduce(lambda out, x: out * x, <collection>)
list_of_chars    = list(<str>)

index = <list>.index(<el>)     # Returns index of first occurrence or raises ValueError.
<list>.insert(index, <el>)     # Inserts item at index and moves the rest to the right.
<el> = <list>.pop([index])     # Removes and returns item at index or from the end.
<list>.remove(<el>)            # Removes first occurrence of item or raises ValueError.
<list>.clear()                 # Removes all items. Also works on dict and set.

整份文檔基本都是代碼,只有個(gè)別內(nèi)容會(huì)添加一些簡短的文字說明,對(duì)于用法創(chuàng)建者為了減少使用者的負(fù)擔(dān),只給了最常見的用法,用最簡潔的方式給你最需要的用法

如果你不想在線使用該文檔,你也可以下載文本,下載地址:https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md

項(xiàng)目地址:https://github.com/gto76/python-cheatsheet

責(zé)任編輯:張燕妮 來源: 開源最前線
相關(guān)推薦

2019-11-25 10:57:39

云計(jì)算遷移人工智能

2017-07-12 10:58:31

醫(yī)療大數(shù)據(jù)電子化服務(wù)

2024-09-27 15:24:15

Spring數(shù)據(jù)加解密

2021-09-24 09:59:59

復(fù)制粘貼PythonPDF

2022-07-15 14:26:36

開源工具IP

2021-09-24 15:00:26

微信PC電腦移動(dòng)應(yīng)用

2021-02-08 11:46:17

Python自動(dòng)化郵件

2024-05-16 13:33:27

系統(tǒng)服務(wù)器網(wǎng)絡(luò)

2025-03-03 00:00:55

Spring文件下載開發(fā)

2021-12-15 10:01:06

Python進(jìn)度條開發(fā)

2024-04-15 00:00:02

OpenAI模型性能

2022-08-30 09:26:24

數(shù)字人民幣

2009-03-20 21:22:03

虛擬化Vmwareesx

2015-10-08 15:38:43

開源IBMLinux on Po

2009-11-28 20:16:04

2022-09-14 10:16:12

MyBatis加密解密

2023-08-11 13:48:34

開發(fā)平臺(tái)

2012-10-10 13:58:43

云打印打印服務(wù)云計(jì)算

2009-06-12 08:51:43

Unix操作系統(tǒng)終端設(shè)置

2020-11-30 15:42:18

SQL
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)