0

In the program given below, why 'None' is included in the output after running the program?

def total_takings(monthly_takings):
    list=[]
    for earnings in monthly_takings:
        list.append(monthly_takings[earnings])
    print(sum(sum(list,[])))



test1= total_takings({'January': [54, 63], 'February': [64, 60], 'March': [63, 49], 'April': [57, 42], 'May': [55, 37], 'June': [34, 32], 'July': [69, 41, 32], 'August': [40, 61, 40], 'September': [51, 62], 'October': [34, 58, 45], 'November': [67, 44], 'December': [41, 58]})

print(test1)
Ashwini Chaudhary
  • 244,495
  • 58
  • 464
  • 504

1 Answers1

0

total_takings() doesn't explicitly return anything, therefore it returns None by default.

A Magoon
  • 1,180
  • 2
  • 13
  • 21