I have a list of objects,
l = (('a1', 1.96256684), ('b3', 1.36), ('e2', 0.5715))
I want to be able to format the numbers to a certain number of decimal places (4) in order to get an output like
a1 1.9626 b3 1.3600 e3 0.5715
I tried the method described here (using isalpha) but get the error
AttributeError: 'tuple' object has no attribute 'isalpha'
I'm wondering if it's because the alphabetic letters have numbers attached to them? But then I would think it would just return False instead of giving me an error.
Thank you for any help or adivce