isdecimal()

isdecimal()
Returns True if all chars are decimal ( 0 to 9) in a string, Otherwise False is returned.
my_str='12345'
print(my_str.isdecimal())      # Output is True

my_str='234ab'
print(my_str.isdecimal())      # Output is False

my_str='234.45'
print(my_str.isdecimal())      # Output is False


All String methods



plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer