input: Write a function to find the largest number in a given list. The function should return the largest number. If the list is empty, the function should return None.
  
  assert find_largest_num([1000, 506, 299, 620, 35])==1000
  assert find_largest_num([-5, -2, -10, -1])==-1
  assert find_largest_num([42])==42
  assert find_largest_num([])==None
output: def find_largest_num(nums):
      if not nums:
          return None
      return max(nums)