Python Revision Notes

 

7. Loops

for i in range(5): print(i) while x > 0: print(x) x -= 1
  • Break: Exit loop.

  • Continue: Skip iteration.


8. Functions

def greet(name): return "Hello " + name print(greet("Ajm"))
  • Built-in functions: len(), type(), id(), sum(), max(), min() etc.

Comments

Popular posts from this blog

Python Revision Notes

Python Revision Notes