def mainloop():
s = getinput()
while len(s)>0:
dosomething(s)
s = getinput()
Assume that the getinput function just reads a line of input and puts the contents into s and assume that the dosomething function just prints its string argument.
What happens if the last two lines of the mainloop function were swapped? Would there be any difference?...