On 07/22/2010 04:41 PM, Martin Albrecht wrote:
> On 22 July 2010 22:26, tvn wrote:
>> is there a trick to convert RealLiteral numbers to strings without
>> the trailing zeros? e.g., 2. and 0.050 become 2
>> and 0.05 respectively --
>
> sage: str(0.53253453425).rstrip(".
sage: str(0.53253453425).rstrip(".0")
'0.53253453425'
sage: str(2).rstrip(".0")
'2'
On 22 July 2010 22:26, tvn wrote:
> is there a trick to convert RealLiteral numbers to strings without
> the trailing zeros? e.g., 2. and 0.050 become 2
> and 0.05 respectively --
>
> -
is there a trick to convert RealLiteral numbers to strings without
the trailing zeros? e.g., 2. and 0.050 become 2
and 0.05 respectively --
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+