Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with While method
#1
EXAMPLE AS FOLLOWS:

Program: print each word in a quote...
start = 0
space_index = quote.find(" ")
while space_index != -1:
# code to print word (index slice start:space_index)
#Output should look like below:
they
stumble
who
run
fast
.

# [ ] Print each word in the quote on a new line
quote = "they stumble who run fast"
# HOW CAN THIS BE DONE PLEASE HELP!!! USING THE .FIND METHOD
Reply


Messages In This Thread
help with While method - by brawdhampshire - Dec-01-2017, 06:32 PM
RE: help with While method - by RickyWilson - Dec-01-2017, 06:41 PM
RE: help with While method - by brawdhampshire - Dec-01-2017, 06:41 PM
RE: help with While method - by micseydel - Dec-01-2017, 09:23 PM
RE: help with While method - by brawdhampshire - Dec-02-2017, 03:54 AM
RE: help with While method - by micseydel - Jun-20-2018, 05:38 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020