All String methods
Returns True if the string is an identifier. Otherwise returns False

What is identifier ( Rules )

  1. identifiers can contain chars ( both lower and upper case ), numbers and underscore.
  2. It can’t start with number
  3. It can’t contain space or any other special chars within it.
print(my_str.isidentifier()) # Output is True

print(my_str.isidentifier()) # Output is False ( # not allowed )

print(my_str.isidentifier()) # Output is True

print(my_str.isidentifier()) # Output is False ( ? not allowed)

my_str='pq rs'              
print(my_str.isidentifier()) # Output is False ( space not allowed)

print(my_str.isidentifier())#Output is False( Can't start with number)

All String methods variables & identifiers in Python

Post your comments , suggestion , error , requirements etc here

Python Video Tutorials
Python SQLite Video Tutorials
Python MySQL Video Tutorials
Python Tkinter Video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2021 All rights reserved worldwide Privacy Policy Disclaimer