isdigit()

my_str.isdigit())
Returns True if all chars are digits in a string, Otherwise False is returned.
my_str='012345'
print(my_str.isdigit())      # Output is True

my_str='12#34'
print(my_str.isdigit())      # Output is False

my_str='abc1234'
print(my_str.isdigit())      # Output is False

my_str='\u0035'              # Unicode of digit 5 
print(my_str.isdigit())      # Output is True


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