Skip to content

Commit 508001a

Browse files
authored
Update ListMethods.md
1 parent 1849dd1 commit 508001a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Data_Structure_In_Python/List/ListMethods.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Output:
2525
```
2626

2727

28-
### 2. count() :100:
28+
### 2. count()
2929
- **count()** method returns the number of elements with the specified value.
3030
- Any type of (string, number, list, tuple, etc.) Data can be counted using count() method.
3131

@@ -69,7 +69,7 @@ print(cnt)
6969
```
7070
Output:
7171
```
72-
`
72+
1
7373
```
7474

7575
### 3.index()
@@ -145,7 +145,7 @@ reversed list ['green', 'blue', 'red']
145145
original list ['red', 'blue', 'green']
146146
```
147147

148-
### 5.sort() :chart_with_upwards_trend:
148+
### 5.sort()
149149
- **sort()** method sort the list in ascending and descending order
150150
- **sort()** method sorts the list ascending by default.
151151

@@ -177,7 +177,7 @@ Output:
177177
```
178178
**Note**: After sorting done using **.sort()** method you can not get original list back all position of all element changed we can not recover it.
179179

180-
**sorted()** :bar_chart:
180+
**sorted()**
181181
- Sorting any sequence is very easy in Python using the built-in method sorted() which does all the hard work for you.
182182

183183
- Sorted() sorts any sequence (list, tuple) and always returns a list with the elements in a sorted manner, without modifying the original sequence.

0 commit comments

Comments
 (0)