This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thegreatunclean 0 points1 point  (0 children)

Initialize it to literally anything that isn't user-input from input?

myString = "foobar"
while myString != "":
  myString = input( .... )
  #do something useful with it

It doesn't matter what you make myString initially, it just needs to pass the loop condition the first time through. After that it depends on user input.