arrrSample =
{'art_other_country_names': None,
'pk_ba_country_id': 186,
'sin_active': 1,
'txt_remarks': '',
'vhr_common_country_name': 'Uzbekistan',
'vhr_formal_country_name': 'Republic of Uzbekistan',
'vhr_nationality': '',
'vhr_short_country_name': '',
'vhr_transaction_currency_code': 'UZS'},
{'art_other_country_names': None,
'pk_ba_country_id': 185,
'sin_active': 1,
'txt_remarks': '',
'vhr_common_country_name': 'Uruguay',
'vhr_formal_country_name': 'Oriental Republic of Uruguay',
'vhr_nationality': '',
'vhr_short_country_name': '',
'vhr_transaction_currency_code': 'UYU'},
{'art_other_country_names': None,
'pk_ba_country_id': 184,
'sin_active': 1,
'txt_remarks': '',
'vhr_common_country_name': 'United States',
'vhr_formal_country_name': 'United States of America',
'vhr_nationality': '',
'vhr_short_country_name': '',
'vhr_transaction_currency_code': 'USD'},
这是我从数据库得到的数据样本如何在单个语句中找到索引?
例如,如果第三个条目的国籍被更新,我需要这样的信息:
arrrSample[index]['vhr_nationality'] ="American"
如何找到索引?我带着'pk_ba_country_id': 184
这个值
也就是arrrSample[2]['pk_ba_country_id'] =184
如何在没有循环的情况下从184中找到索引2
我需要从值中找到索引,我不希望使用循环数组,因为数据库可以包含大量数据
我假设您的目标是这样的(
arrrSample
的格式不正确)相关问题 更多 >
编程相关推荐