What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » python functions wft

python functions wft
Author: Message:
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
O.P. RE: python functions wft
why not?
the return will act if a break if it works correctly anyway
quote:
Originally posted by Jarrod

   
code:

    s = raw_input("what is the string")

    def words2number(s):

        while 1:

            s = s.replace('one','1')
            s = s.replace('two','2')
            s = s.replace('three','3')
            s = s.replace('four','4')
            s = s.replace('five','5')
            s = s.replace('six','6')
            s = s.replace('seven','7')
            s = s.replace('eight','8')
            s = s.replace('nine','9')
            s = s.replace('zero','0')
            s = .replace(' ','')
            s = s.strip()
            s = s

            return s

    words2number(s)



z = words2number(s)
print z

stop spamming you 2

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














08-03-2008 01:53 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
python functions wft - by Jarrod on 08-02-2008 at 11:58 PM
RE: python functions wft - by segosa on 08-03-2008 at 01:37 AM
RE: python functions wft - by Jarrod on 08-03-2008 at 01:53 AM
RE: python functions wft - by ShawnZ on 08-03-2008 at 10:01 AM
RE: python functions wft - by Mnjul on 08-03-2008 at 10:07 AM
RE: python functions wft - by Jarrod on 08-03-2008 at 11:14 AM
RE: python functions wft - by foaly on 08-03-2008 at 11:54 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On