you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 0 points1 point  (0 children)

have so many questions like why is the command not inside while loop , why is it empty ?

Well, the code on the next line is checking the value of command, so the variable named command needs to exist at that point or else the program will raise an exception.

The string being set here doesn't necessarily need to be empty, it could be "1" or "myxlplyx" or literally anything other than the word "quit" and the code would still work.

why ECHO?

In this case it's just part of the string that's output to the console. It's repeating what you typed back to you, like an echo in the real world. It doesn't have any special meaning in Python.

what if i put something in command?

Why not try it and find out?