I'm currently creating a program that sums the input from the user and returns it as a float.
When I try to run the code below with inputs such as "20.1", I receive ValueError: could not convert string to float: '.'
Shouldn't 20.1 be accepted as a float value?
abc = []
i = 0
while True:
i += 1
item = input("Transaction " + str(i) + ": ")
if item == '':
break
abc.extend(item)
abc = [float(k) for k in abc]
print(sum(abc[0:len(abc)]))