Python‎ > ‎str‎ > ‎

str.isprintable()


Definition
Return True if all characters in S are considered printable in repr() or S is empty, False otherwise.

Syntax
str.isprintable()

Parameters
str=string

Examples
The returns are as follows:
 >>> "Python".isprintable()
True
>>> "Python Lake Learning Centre, 2014".isprintable()
True
>>> "".isprintable()
True
>>> "122.00".isprintable()
True
>>>

Equal to:
>>> x=""
>>> x.isprintable()
True
>>> x='infinity'
>>> x.isprintable()
True
>>> 'infinity'.isprintable()
True
>>>

Comments