title: How do I solve issue of execution of code inside an if condition (not running even when if condition is true)
body: <p>Okay so apparently my if condition should be true, and the lines of code in the if should be executed. But unfortunately the statements in if conditions are not working.</p>
  <pre><code>    def drive(self, msg):
         self.move = 0
         self.move = msvcrt.getch()
         self.speed()
  
     def speed(self):
         print(self.move.lower())      #print 'w'
         if self.move.lower() == 'w':   
             print(&quot;I'm in W!!!&quot;)      #but this doesn't get executed
             self.control.setBrake(0)
             accel += 0.05
             if accel &gt; 1:
                 accel = 1.0
  </code></pre>
  <p>Please help</p>