input: def smallestNumber(nums: List[int]) -> int:
      """
      Find the smallest number in a given list.
      >>> smallestNumber([4, 5, 6, 7, 8])
      4
      >>> smallestNumber([10, 2, 3, 4, 5])
      2
      """
output:     if not nums:
          return None
      smallest = nums[0]
      for num in nums:
          if num < smallest:
              smallest = num
      return smallest