There is also
my_string[:my_string.index('.') + 3]
or
"{0:.2f}".format(float(my_string))
but the program no longer illustrates the split() method.
Gribouillis
Posting Maven
3,101 posts since Jul 2008
Reputation Points: 1,130
Solved Threads: 761
Skill Endorsements: 11