java and python equivalent of php's foreach($array as $key => $value)

前端 未结 8 1044
抹茶落季
抹茶落季 2020-12-20 11:56

In php, one can handle a list of state names and their abbreviations with an associative array like this:



        
8条回答
  •  北海茫月
    2020-12-20 12:45

    In python an ordered dictionary is available in Python 2.7 (not yet released) and Python 3.1. It's called OrderedDict.

提交回复
热议问题