Ok well I've hit a snag... i'm trying to write a program that makes Acronyms from user input... I can get all the letters capitalize, but the problem i am having is, well, taking the first letter from each and puting them together to make an acronym!!!!!
c_shaft05
0
Junior Poster in Training
Recommended Answers
Jump to Postyou could use the split method
>>> "the dog is going home".split() ['the', 'dog', 'is', 'going', 'home']
I hope I did not ruin your fun , but here is the code I would use
userinput = raw_input('> ') split_input = userinput.split() x = "" …
Jump to Postthis code is a little more polished
userinput = raw_input('> ') split_input = userinput.split() x = "" for i in split_input: x = x + i[0] + "." print x.upper()
All 6 Replies
shanenin
0
Posting Whiz in Training
shanenin
0
Posting Whiz in Training
shanenin
0
Posting Whiz in Training
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
mawe
6
Junior Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.