Browse Source

List

pull/28/head
Jure Šorn 6 years ago
parent
commit
95ea94bfc3
1 changed files with 7 additions and 7 deletions
  1. 14
      README.md

14
README.md

@ -21,8 +21,8 @@ List
```
```python
<list>.append(<el>) # Or: <list> += [<el>]
<list>.extend(<collection>) # Or: <list> += <collection>
<list>.append(<el>) # Or: <list> += [<el>]
<list>.extend(<collection>) # Or: <list> += <collection>
```
```python
@ -43,11 +43,11 @@ list_of_chars = list(<str>)
```
```python
index = <list>.index(<el>) # Returns first index of item.
<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.
index = <list>.index(<el>) # Returns first index of item.
<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.
```

Loading…
Cancel
Save