You are viewing a single comment's thread from:
RE: Part 9: How To Calculate A Post's Total Rewards Using Steem-Python
It's because Amount
is a class in steem-python
that splits a string like "10 SBD" into amount
(10) and asset
(SBD) as you can see here. The float()
function just converts a number or a string into a float! If you really wanted you could do recent_claims = float(reward_fund["reward_balance"].split()[0])
instead, but it's easier to just use Amount
class.
I see, thank you!
This example here shows better what is going on, nice, now I have two options!