Python Revision Notes

 

5. Operators

  • Arithmetic: + - * / % // **

  • Comparison: == != > < >= <=

  • Logical: and or not

  • Assignment: = += -= *= etc.

  • Membership: in, not in

  • Identity: is, is not


6. Conditional Statements

if x > 0: print("Positive") elif x == 0: print("Zero") else: print("Negative")

Comments

Popular posts from this blog

Python Revision Notes

Python Revision Notes

Python Revision Notes