Lệnh sau không chạy:
Lệnh sau thì chạy:
Ai biết xin chỉ cho mình lý do.
Python:
a_dict = {'color': 'blue', 'fruit': 'apple', 'pet': 'dog'}
for key, val in a_dict.items():
print(key)
print(val)
Python:
a_dict = {'color': 'blue', 'fruit': 'apple', 'pet': 'dog'}
for key, val in a_dict.items():
print(key,val)