Write a Python function that takes a sequence of numbers and determines whether all the numbers are different from each other


Topic: Write a Python function that takes a sequence of numbers and determines whether all the numbers are different from each other

Solution

def test_distinct(data):
  if len(data) == len(set(data)):
    return True
  else:
    return False



List all Python Programs