I am trying to write a program that will receive inputs, run some calculations and store them in a list before adding the elements of the list. but I keep getting the error: wh_list = wh_list.append(wh) AttributeError: 'NoneType' object has no attribute 'append'
code:
wh_list = []
u = len(wh_list)
if u <= 1:
while True:
inp = input("Y or N:")
B = int(input("B value:"))
C = int(input("C value:"))
D = int(input("D value:"))
wh = B * C * D
wh = int(wh)
wh_list = wh_list.append(wh)
if inp == "Y":
break
else:
Ewh = sum(wh_list)
print(Ewh)