Could this be solve with list comprehension?

Here are the 3 different ways to perform these actions!
@mtf SIR, CHECK THIS OUT!!

def max_num(nums):

print(max(nums)) #1 
m = sorted(nums)
print(m[-1]) #2
 t = nums[0]
for i in range(len(nums)):
    if nums[i] > t:
        t = nums[i]
    else:
        continue
    return t #3

print(max_num([50, -10, 0, 75, 20]))

output: 75
75
75

def max_num(nums):
  nums.sort()
  return nums[-1]

#Uncomment the line below when your function is done
print(max_num([50, -10, 0, 75, 20]))

I feel like this is a very simple way to solve this problem, by sorting the list you are guarnteed the largest number to be the last in the list and so you just return that last value!