while 1: cmd = raw_input("Enter command > ") if not cmd: break # Process command ...
# Print non-negative list elements for item in s: if item < 0: continue print item