Tutorials Point


  Python Basics
  Python Advanced
  Python Useful References
  Python Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

Python String isa1num() Method


previous next AddThis Social Bookmark Button


Advertisements

Description:

This method checks whether the string consists of alphanumeric characters.

Syntax:

str.isa1num()

Parameters:

Here is the detail of parameters:

  • NA

Return Value:

It return true if all characters in the string are alphanumeric and there is at least one character, false otherwise.

Example:

#!/usr/bin/python


str = "this2009";  # No space in this string
print str.isalnum();

str = "this is string example....wow!!!";
print str.isalnum();

This will produce following result:

True
False


previous next Printer Friendly

Advertisements


  

Advertisements