using pythonic way for if statement when getting funds