标签:key dict value int one ict for break bre
`dict1={‘name‘:‘Lara‘,‘age‘:18}
for one in dict1:
if ‘name‘ in dict1:#或dict1.keys()
print(‘key在字典中!‘)
break
for one in dict1:
if ‘Lara‘ in dict1.values():
print(‘value在字典中!‘)
break`
标签:key dict value int one ict for break bre
原文地址:https://www.cnblogs.com/jayzhao/p/14664111.html