is numeric:

  •  Is numeric is the built-in method that is used to check whether the string contains numbers or not.
  • It returns the true when the string contains numbers, if the string does not contain numbers then it returns false.
  • It is applicable for integers, Unicode values. and takes the exponents like 1/2.
  • It is not applicable for float and negative values.
  •  isnumeric does not have any parameters.
  • For negative values to check whether they are numeric or not we have to remove the negative sign.
syntax:  str.isnumeric()

Example: a="12345"



#write a python program to demonstrate the isnumeric function.

  1. x="34567"
  2. x=str.isnumeric(x)
  3. print(x)
  4. y="123abc"
  5. y=str.isnumeric(y)
  6. priny(y)
  7. z="asd13434656"
  8. z=str.isnumeric(z)
  9. print(z)
output: true


Instance Of Java

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
Newer Post
Older Post

No comments

Leave a Reply

Select Menu