Whenever you find yourself wanting to compare the items in two collections, consider whether set arithmetic might help.
For example, to find which required fields are missing:
required = {"name", "email", "password"}
provided = set(form_data.keys())
missing = required - provided
More 👇
Sets are unordered collections of values that are great for removing duplicates, quick containment checks, and set operations.