×

Python Tutorial

Python Basics

Python I/O

Python Operators

Python Conditions & Controls

Python Functions

Python Strings

Python Modules

Python Lists

Python OOPs

Python Arrays

Python Dictionary

Python Sets

Python Tuples

Python Exception Handling

Python NumPy

Python Pandas

Python File Handling

Python WebSocket

Python GUI Programming

Python Image Processing

Python Miscellaneous

Python Practice

Python Programs

Python Keywords

By IncludeHelp Last updated : December 07, 2024

What are Python Keywords

Keywords are the reserved words in Python programming language (and, any other programming languages like C, C++, Java, etc) whose meanings are defined and we cannot change their meanings. In python programming languages, keywords are the case sensitive.

Note: We cannot use any reserved words (which are known as Keywords) as an identifier (like a variable name, function name, etc).

List of Python Keywords

Here is the list of Python keywords (the list can be varied based on the Python versions),

Keywords in Python 2.5

The following are the Keywords in Python 2.5:

  1. and
  2. del
  3. from
  4. not
  5. while
  6. as
  7. elif
  8. global
  9. or
  10. with
  11. assert
  12. else
  13. if
  14. pass
    pass Statement
  15. yield
  16. break
    break Statement
  17. except
  18. import
  19. print
    print Function
  20. class
  21. exec
  22. in
  23. raise
  24. continue
    continue Statement
  25. finally
  26. is
  27. return
  28. def
  29. for
  30. lambda
  31. try

Keywords in Python 3.8.1

The following are the Keywords in Python 3.8.1:

  1. False
  2. None
  3. True
  4. and
  5. as
  6. assert
  7. async
  8. await
  9. break
  10. class
  11. continue
  12. def
  13. del
  14. elif
  15. else
  16. except
  17. finally
  18. for
  19. from
  20. global
  21. if
  22. import
  23. in
  24. is
  25. lambda
  26. nonlocal
  27. not
  28. or
  29. pass
  30. raise
  31. return
  32. try
  33. while
  34. with
  35. yield

Reference

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.