python 3.x - using a looop to add user input to the set and dict in order discovered -


so i'm trying write small program few things. first is:

write while loop repeatedly creates list of words line of input user. did this:

s = input("please enter sentence: ") while true:      pos = 0     c in s:          if c == " ":             print(s[:pos])             s = s [pos+1:]             break         pos += 1     else:         print(s)         break 

i need add user inputted words set , dict , display value in order in program discovered them. believe need loop i'm not sure. i'm pretty lost @ point , above far can seem come on program. appreciated (obviously)new @ python.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -