Re: [sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread Mitesh Patel
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(".

Re: [sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread Martin Albrecht
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  -- > > -

[sage-support] converting RealLiteral to str without trailing zero's

2010-07-22 Thread tvn
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+