Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a8dda95

Browse files
added median snippet
added median python snippet in README.md
1 parent 8f499db commit a8dda95

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,3 +428,12 @@ def write_to_file(filename, content):
428428
print("Failed to write to file with error: ")
429429
print(e)
430430
```
431+
### Median of given array
432+
This method returns the median of the given list/array as an output.
433+
```python
434+
import statistics
435+
def median(arr):
436+
print(statistics.median(arr))
437+
```
438+
439+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /