[Solved] Counting percentage of element occurence from an attribute in a class. Python
With for element in range(len(atm_transaction_list)):, you are iterating over integers in a range. This is generally used when you want to work with indices. However, you’re not doing that. Simply iterate over the transaction list itself, with for transaction in atm_transaction_list:. Each transaction will then be a Transaction object. I would also recommend storing your … Read more