input: Write a function to generate a random number between two given input numbers. The function should take two parameters: start and stop, which are the range of the random number. If start is greater than stop, the function should swap their values before generating the random number. The function should return the random number generated within the specified range.
  assert random_num(0, 10)==5
  assert random_num(-5, 5)==0
  assert random_num(10, 0)==7
  assert random_num(0, 0)==0
output: import random
  
  def random_num(start, stop):
      if start > stop:
          start, stop = stop, start
      return random.randint(start, stop)