Identifiers and Reserved words in python

What is Identifiers ??

So here is the Answer

Name in python known as Identifiers

It can be class name , function name , variable name.

Rules to define identifiers in python

  1. Allowed characters –>

 All alphabets

All digits (0-9)

Underscore symbol(_)

  1. Case sensitive → Python is a case sensitive language
  2. Should not start with digit → we can’t use digit at the starting of the identifiers
  3. Reserved words → Reserved words are not allowed
  4. To make any variable , function private we use underscore at the starting.

What is Reserved words??

A word which have particular meaning known as Reserved words

There are 33 reserved words in python

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

check video tutorial for this

Leave a Reply

Your email address will not be published. Required fields are marked *