Python Forum

Full Version: Float Object is not Subscriptable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have this object:

a=(994.7, <__main__.bit object at 0x7f35b7f2c220>)
And I am trying to get just 994.7 so I am using this:
a[0][1]
But I have float object is not sunbscriptable error

HOw can I solve the problem?
From what you show a is a tuple. so just a[0]
(Apr-20-2021, 09:13 AM)buran Wrote: [ -> ]From what you show a is a tuple. so just a[0]

thanks!!