|
|
|
|
|
by JshWright
4965 days ago
|
|
Also some weird coding choices... The first problem has a function 'prototyped' as: def checkio(data):
balance, withdrawal = data
Where 'data' is a list, the first element being the initial balance, the second element being a list of withdrawals (plural... despite the fact that it's called 'withdrawal' when it's unpacked).Why bother with the list unpacking? Why not just define the function as: def checkio(balance, widthdrawals):
pass
EDIT: Giving it some thought, I assume future problems will use the same 'checkio' function, so it has to have the same argument list...Using kwargs might be more Pythonic, if that's a design constraint... |
|