-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
  • 138,499
  • 22
  • 57
  • 95
braco22
  • 1
  • 2

1 Answers1

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