strings
Nick Welch
mack at incise.org
Thu Sep 4 01:11:11 EDT 2003
More information about the Python-list mailing list
Thu Sep 4 01:11:11 EDT 2003
- Previous message (by thread): strings
- Next message (by thread): strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Sep 04, 2003 at 04:18:38AM +0000, Scribe wrote:
> if it is a decimal I want to return the number without the commer any
> others return 0.
"commer"?
str.isdigit() should do most of it for you.
def foo(mystr):
if mystr.isdigit():
return "the number without the commer (??) :)"
else:
return 0
--
Nick Welch aka mackstann | mack @ incise.org | http://incise.org
Penguin Trivia #46:
Animals who are not penguins can only wish they were.
-- Chicago Reader 10/15/82
- Previous message (by thread): strings
- Next message (by thread): strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list