Usually happens with dicts.
hydrogen = {
"name": "Hydrogen",
"atomic_weight": 1.008,
"atomic_number": 1
}
This does not raise an error:
for key, value in hydrogen.items():
print("Key:", key)
print("Value:", str(value))
You have to do hydrogen.items() in order to access the keys and values.
Otherwise it will return an error.