Medial number
Problem to find medial number from list.
Example-1:
Input : l = [ 1, 2, 3, 4, 5] Output : 3
Example-2:
Input : l = [ 1, 2, 3, 4] Output : Null
Solution
l = [ 1, 2, 3, 4, 5] if(len(l) % 2 == 0): print("Null") else: a = len(l)//2 print(l[a])
Output
3