I need help writing a program that will read a string from the user and print the string with every other word removed.
Ex.
Input sentence:
Hello everybody
Eloeeyoy
Cducks 0 Newbie Poster
Recommended Answers
Jump to Post— bumsfeld 413Your example answer is wrong.
Jump to Post— snippsat 661That gives wrong output james.lu.75491856.
There is no need to split and loop over words.input_string = raw_input("Input") print input_string[::2]
All 5 Replies
bumsfeld 413 Nearly a Posting Virtuoso
Cducks 0 Newbie Poster
snippsat 661 Master Poster
james.lu.75491856 0 Junior Poster
snippsat 661 Master Poster
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.