InterviewSolution
Saved Bookmarks
| 1. |
Write the syntax of isdecimal( ) and give suitable example |
|
Answer» The method isdecimal( ) checks whether the string consists of only decimal characters. This method are present only on Unicode objects. Below is the example. Syntax str.isdecimal( ) Example # !/usr/bin/python str = u”this2009″; print str.isdecimal( ); str = u”23443434″; print str.isdecimal( ); This will produce the following result : False True |
|