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
Post a Comment