Parse from a string representation (repr)

def loads(cls, s: str) -> 'Money':
        """Parse from a string representation (repr)"""
        try:
            currency, amount = s.strip().split()
            return cls(amount, currency)
        except ValueError as err:
            raise ValueError("failed to parse string "
                             " '{}': {}".format(s, err))