Hi everyone!. I am a beginner and taking the Boot Camp Lesson.

if not self.Portfolio.Invested:
            self.MarketOrder("IWM", 100)
            self.Debug( str(self.Portfolio["IWM"]. AveragePrice))

I don't understand the "if not" part and what is self.Debug.

Thank you!

Author