← 返回列表

Python3 字典 Has_Key 方法

Python3 字典 Has_Key 方法 #!/usr/bin/python3 dict = {'Name': 'Zara', 'Age': 7} print ("Value : %s" % dict.has_key('Age')) print ("Value : %s" % dict.has_key('Sex'))

Python3 字典 Has_Key 方法

#!/usr/bin/python3

dict = {'Name': 'Zara', 'Age': 7}

print ("Value : %s" %  dict.has_key('Age'))
print ("Value : %s" %  dict.has_key('Sex'))

打开资源 ↗

交流与评论