https://ideone.com/BPflPk Please tell me why 'print s' statement is being executed inside loop, though I put it outside. Please help. I am new to python.