return maximum of three values in python

Solutions on MaxInterview for return maximum of three values in python by the best coders in the world

showing results for - "return maximum of three values in python"
Gabriele
31 Nov 2016
1def maximum(a,b,c):
2  max_val = a
3  if b > max_val:
4    max_val = b
5  if c > max_val:
6    max_val = c
7  return max_val