-1
defaultdict(<class 'float'>, {('03/24/21', 'BLUE', '390'): 176.0, ('03/24/21', 'BLUE', '391'): 182.0})

Instead of printing as per the above with the : indicating the sums, I want to print each item separately like:

{('03/24/21', 'BLUE', '390'): 176.0 ........ new line
('03/24/21', 'BLUE', '391'): 182.0

However when I try

for d in dictionary:
 print(d)

output:

the sum is missing.i only get:

{('03/24/21', 'BLUE', '390') ..........new line
('03/24/21', 'BLUE', '391')
Nick
  • 123,192
  • 20
  • 49
  • 81
braco22
  • 1
  • 2

1 Answers1

0
for d in dictionary.items(): print(d)
Bing Wang
  • 1,500
  • 1
  • 7
  • 7