← Back to challenges

Check if objOne Is Equal to objTwo

PythonMediumobjectsvalidationlanguage_fundamentals

Instructions

Create a function that checks to see if two object arguments are equal to one another. Return True if the objects are equal, otherwise, return False.

Examples

# The first object parameter.

obj_one = {
  "name": "Benny",
  "phone": "3325558745",
  "email": "[email protected]"
}

# The second object parameter.

obj_two = {
  "name": "Jason",
  "phone": "9853759720",
  "email": "[email protected]"
}


is_equal(obj_one, obj_two)
➞ False
# The first object parameter.

obj_one = {
  "name": "Jason",
  "phone": "9853759720",
  "email": "[email protected]"
}

# The second object parameter.

obj_two = {
  "name": "Jason",
  "phone": "9853759720",
  "email": "[email protected]"
}


is_equal(obj_one, obj_two)
➞ True

Notes

If you have a suggestion on how to make these instructions easier to understand, please leave a comment. Your feedback is greatly appreciated.

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Return Something to Me!