Python/QuickRef: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
(Created page with "{| class="wikitable" ! list || set || dict |- | || || || |}")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable"
{| class="wikitable"
! list || set || dict  
! [https://docs.python.org/3/tutorial/datastructures.html#more-on-lists list]
! [https://docs.python.org/3/tutorial/datastructures.html#sets set]
! [https://docs.python.org/3/library/stdtypes.html#mapping-types-dict dict]
|-
|-
| || || ||
| valign="top" |
* append(x)
* extend(iter)
* insert(i, x)
* remove(x)
* pop([i])
* clear()
* index(x)
* count()
* sort()
* reverse()
* copy()
| valign="top" |
* add(x)
* remove(x)
* pop()
* clear()
| valign="top" |
* clear()
* copy()
* get(key, [default])
* items()
* keys()
* pop(key, [default])
* popitem()
|}
|}

Latest revision as of 12:26, 29 January 2021

list set dict
  • append(x)
  • extend(iter)
  • insert(i, x)
  • remove(x)
  • pop([i])
  • clear()
  • index(x)
  • count()
  • sort()
  • reverse()
  • copy()
  • add(x)
  • remove(x)
  • pop()
  • clear()
  • clear()
  • copy()
  • get(key, [default])
  • items()
  • keys()
  • pop(key, [default])
  • popitem()