Python Typeerror Float Object Is Not Subscriptable