there for The main purpose of a loop is to iterate over the values of a list , But the value of the first key value pair is not a list , Is there any way to skip the first key , Start with the second key ?
agent = {
'number': '1001', 'agent_name': ['one', 'two', 'three'], 'agent_city': ['x', 'y', 'z'], }for na, ci in agent.items(): print(na.title() + ", nice to meet you") for cii in ci: print('\t' + cii)
agent = {
'number': '1001', 'agent_name': ['one', 'two', 'three'], 'agent_city': ['x', 'y', 'z'], }for na, ci in agent.items(): if isinstance(ci, list): # The type of judgment value print(na.title() + ", nice to meet you") for cii in ci: print('\t' + cii)