Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save abu-yusuf-dev/b8996f02ac5467a2b0df8b12f8f990de to your computer and use it in GitHub Desktop.

Select an option

Save abu-yusuf-dev/b8996f02ac5467a2b0df8b12f8f990de to your computer and use it in GitHub Desktop.
Finding Median in Python for many Inputs.Here user can take as much inputs as he wants.And after that he will get the exact median value..
import statistics
a = [int(x) for x in input().split()]
w=a.sort()
median=statistics.median(a)
print("Median is : %.2lf" %median)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment