iterating one key in a python multidimensional associative array

前端 未结 3 567
礼貌的吻别
礼貌的吻别 2021-01-27 17:41

I\'m dynamically creating a 2 dimensional associative array (dictionary?)

I\'m trying to loop through its keys - while keeping one of the indexes constant, so for instan

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-27 18:02

    >>> for k in myhash['john']:
    ...     print(k)
    ... 
    smith
    doe
    

提交回复
热议问题