0% found this document useful (0 votes)
2 views2 pages

Essential Python Keywords Explained

The document lists and defines various keywords in Python, including their purposes such as logical operations, function definitions, and exception handling. Each keyword is briefly explained, highlighting its role in programming with Python. The document also includes a name and grade at the end.

Uploaded by

biruksetotaw19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Essential Python Keywords Explained

The document lists and defines various keywords in Python, including their purposes such as logical operations, function definitions, and exception handling. Each keyword is briefly explained, highlighting its role in programming with Python. The document also includes a name and grade at the end.

Uploaded by

biruksetotaw19
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Keyword in Python

1. `and` - Logical operator for conjunction.

2. `as` - Used to create an alias for a module or item

3. `assert` - Used in debugging to check a condition

4. `break` - Used to exit a loop prematurely

5. `class` - Keyword used to define a new class

6. `continue` - Used to skip the remaining code inside a loop and start the
next iteration

7. `def` - Used to define a new function

8. `del` - Used to delete a reference to an object

9. `elif` - Short for "else if", used in conditional branch.

10. `else` - Used in conditional branching

11. `except` - Used in exception handling

11. `finally` - Used in exception handling to ensure a block of code is always


executed

12. `for` - Keyword used to create a for loop

13. `from` - Used to import specific items from a module

14. `global` - Used to declare a global variable inside a function

15. `if` - Used in conditional branching

16. `import` - Keyword used to import a module

17. `in` - Used to test if a sequence contains a certain value

18. `is` - Used for identity testing

19. `lambda` - Used to create anonymous functions

20 `not` - Logical operator for negation

21. `or` - Logical operator for disjunction

22.`pass` - Used as a placeholder for future code

23. `raise` - Used to raise an exception


24. `return` - Used to exit a function and return a value

25. `try` - Used for exception handling

26. `while` - Keyword used to create a while loop

27. `with` - Used to simplify exception handling and resource management

29.`yield` - Used in generator functions to produce a series of values

These are Python keywords, and they have specific meanings within the
Python programming language.

Name: biruk setotaw

Grade :11A

You might also like