Python Forum
Creating Nested Dictionaries Confusion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating Nested Dictionaries Confusion
#2
data = {'stoker': {}}
data1 = {}
data1['sensors'] = 'null'
data1.update({'blowers': 'null'})
data['stoker'].update(data1)

print(data)
Output:
{'stoker': {'sensors': 'null', 'blowers': 'null'}}
Reply


Messages In This Thread
RE: Creating Nested Dictionaries Confusion - by Yoriz - May-18-2020, 08:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating a list of dictionaries while iterating pythonnewbie138 6 3,342 Sep-27-2020, 08:23 PM
Last Post: pythonnewbie138
  Searching through Nested Dictionaries and Lists Dave_London 1 8,560 Jul-09-2020, 03:36 PM
Last Post: mrdominikku
  creating a list of dictionaries from API calls AndrewEnglsh101 5 3,140 Apr-03-2020, 02:21 PM
Last Post: AndrewEnglsh101
  Finding value in nested dictionaries with lists mart79 16 8,361 Mar-08-2020, 08:16 PM
Last Post: ndc85430
  nested dictionaries to CSV mart79 9 12,576 Jul-29-2019, 04:59 AM
Last Post: mart79
  Transform simplified dictionary to nested dictionaries bhojendra 1 2,397 Jul-02-2019, 02:05 PM
Last Post: ichabod801
  creating an 'adress book' in python using dictionaries? apollo 6 14,903 May-06-2019, 12:03 PM
Last Post: snippsat
  Help to flatten list of nested dictionaries shawbapmp 4 5,772 Feb-25-2019, 10:18 PM
Last Post: shawbapmp
  Nested Dictionaries with Lists BriHaug 1 55,782 Feb-23-2019, 02:10 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020