List with many dictionaries VS dictionary with few lists?

后端 未结 6 2220
你的背包
你的背包 2020-12-29 02:40

I am doing some exercises with datasets like so:

List with many dictionaries

users = [
    {\"id\": 0, \"name\": \"Ashley\"},
    {\         


        
6条回答
  •  离开以前
    2020-12-29 03:06

    First option of list of dictionaries will be much better for quite few reasons. List does provides methods such as EXTEND, APPENT, PUSH which are not readily available with dictionaries.

提交回复
热议问题