I'm querying an activity log via API that returns a dict. Each activity has 50 or more keys/properties. I only want to print the handful of properties that are relevant to me. Not every property I'm trying to print, like deviceIP, is always populated. If it's not populated, I want to print an empty string in place of the variable.
Is there an inline/simple way to print a default value? Something like:
print(activity['deviceIP'] or "")