I am trying to create an Python array of dictionaries where the input order is important and the data may be of various types. (I.e. string, integer, float, etc.)
Here's what an example would look like in Lua:
build =
{
{
Type = SubSystem,
ThingToBuild = "fighter",
RequiredResearch = "",
RequiredShipSubSystems = "",
DisplayPriority = 0,
DisplayedName = "$7000",
Description = "$7001"
},
{
Type = SubSystem,
ThingToBuild = "corvette",
RequiredResearch = "",
RequiredShipSubSystems = "",
DisplayPriority = 0,
DisplayedName = "$7002",
Description = "$7003"
},
{
Type = SubSystem,
ThingToBuild = "frigate",
RequiredResearch = "",
RequiredShipSubSystems = "",
DisplayPriority = 0,
DisplayedName = "$7004",
Description = "$7005"
},
}
How would I accomplish this using similar shorthand/syntactic sugar in Python? Thanks.
OrderedDictbut does not use the shorthand.