fix typo in contributor databse
This commit is contained in:
@ -3,12 +3,12 @@ Bubble_sort uses the technique of comparing and swapping
|
||||
|
||||
```python
|
||||
def bubble_sort(arr):
|
||||
for passnum in range(len(arr)-1,0,-1):
|
||||
for passnum in range(len(arr) - 1, 0, -1):
|
||||
for i in range(passnum):
|
||||
if arr[i]>arr[i+1]:
|
||||
if arr[i] > arr[i + 1]:
|
||||
temp = arr[i]
|
||||
arr[i] = arr[i+1]
|
||||
arr[i+1] = temp
|
||||
arr[i] = arr[i + 1]
|
||||
arr[i + 1] = temp
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ Uses the list comprehension to increment a counter each time you encounter the s
|
||||
|
||||
```python
|
||||
def count_occurrences(lst, val):
|
||||
return len([x for x in lst if x == val and type(x) == type(val)])
|
||||
return len([x for x in lst if x == val and type(x) == type(val)])
|
||||
```
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user