Sort:  

I can't run this without getting TypeError: must be str, not float.

Oh, my fault. Sorry. https://pastebin.com/5f5A2fwi

Seems like the correct solution, congratulations!

Nice, thank you :)