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

前端 未结 8 1048
抹茶落季
抹茶落季 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:49

    Also, to maintain insertion order, you can use a LinkedHashMap instead of a HashMap.

提交回复
热议问题