Write a python function get the maximum number in passed list


Topic: Write a python function get the maximum number in passed list

Solution

def max_check(x):
    max_val = x[0] 
    for check in x: 
        if check > max_val: 
            max_val = check 
    return max_val
print(f'{max_check([2,4,5,7,98])}')



List all Python Programs