operation with strings and numbers
Hellas
hellas_74 at hotmail.com
Sat Oct 16 05:44:38 EDT 2004
I told "italian boy" only for my English that's orrible
Everyone says that in italian the english school is not good
Thanks for suppport
"Ville Vainio" <ville at spammers.com> ha scritto nel messaggio
news:du7acun3kvz.fsf at mozart.cc.tut.fi...
>>>>>> "Hellas" == Hellas <hellas_74 at hotmail.com> writes:
>
> Hellas> Hello guy
>
> Hellas> I'm italian boy, I need help for doing a strange thing
> Hellas> with numbers
>
> Did you mean Italian SCHOOLboy, be any chance? Don't be afraid to say
> so, because everyone can guess anyway.
>
>
>
> Hellas> I have a number from operation like this:
> Hellas> a = float("010.123")
> Hellas> b = float("001.124")
> Hellas> p= a*b
> Hellas> p="%06.3f" % p
> Hellas> the resulted is "_11,278" where "_" is a space
>
> No, it isn't.
>
> In [6]: "%06.3f" % p
> Out[6]: '11.378'
>
>
> In [7]: "%07.3f" % p
> Out[7]: '011.378'
>
> Hellas> I must to change the formatting of this number in "011278"
> Hellas> but I don't known
>
> In [8]: "lunttaus".replace("t","")
> Out[8]: 'lunaus'
>
> --
> Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list