00
From: Jason Massey <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] printing an acronym
Something like this:
def acro(a):
... b = a.split()
... c = ""
... for d in b:
... c+=d[0].upper()
... return c
other than the horrible variable nam
Forwarding to tutor
-- Forwarded message --
Date: Mon, 26 Sep 2005 08:32:02 -0500
From: Jason Massey <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] printing an acronym
Something like this:
def acro(a):
... b = a.split()
... c = &q
On Sat, 24 Sep 2005 [EMAIL PROTECTED] wrote:
> How could I get the following to print out an acronym for each phrase
> entered such as if I entered random access memory it word print out RAM?
Hello,
Just out of curiosity, are you already familiar with Python's "lists"?
If so, then you might
> Hello
> How could I get the following to print out an acronym for each phrase
> entered such as if I entered random access memory it word print out RAM?
> import string
> def main():
> phrase = (raw_input("Please enter a phrase:"))
> acr1 = string.split(phrase)
> acr2 = string
Hello
How could I get the following to print out an acronym for each phrase
entered such as if I entered random access memory it word print out RAM?
import string
def main():
phrase = (raw_input("Please enter a phrase:"))
acr1 = string.split(phrase)
acr2 = string.capwords(phrase