I have a dict in this format:
d_data = {'key_1':value_1,'key_2':value_2,'key_3':value_3,'key_x':value_x,'key_n':value_n}
and I have to iterate over it's items:
for key,value in columns.items():do something
except for the pair:
'key_x':value_x
I have a dict in this format:
d_data = {'key_1':value_1,'key_2':value_2,'key_3':value_3,'key_x':value_x,'key_n':value_n}
and I have to iterate over it's items:
for key,value in columns.items():do something
except for the pair:
'key_x':value_x
Simply use the continue
statement, to skip ahead to the next iteration of the for loop:
for key,value in columns.items():if key == 'key_x':continue# do something