Because while using items function of dictionary programmer missed to write parenthesis, ()
user = {
"name": "Saurabh Gupta",
"age": 35,
"city": "Noida"
}
for key, value in user.items:
print(key)# TypeError: 'builtin_function_or_method' object is not iterable
items를 사용할때 ()를 안 했다.
for key, value in user.items():
print(key)