Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to check whether input is string or not

num = input("Enter your number ")

print("
")
if num.isdigit():
    print("User input is Number ")
else:
    print("User input is string ")
Comment

PREVIOUS NEXT
Code Example
Python :: making your own range function with step in python 
Python :: python code for binary search tree 
Python :: size pilimage 
Python :: how to implement heap in python 
Python :: how to omit days pandas datetime 
Python :: python get ids from array of objects 
Python :: concate the dataframe in pandas.. 
Python :: :: python 
Python :: pass integer by reference in Python 
Python :: how to iterate a list in reverse order in python with index 
Python :: pyspark groupby with condition 
Python :: {} string python 
Python :: na.fill pyspark 
Python :: Tuple: Create tuple 
Python :: django-tool-bar 
Python :: Insert between Characters Python 
Python :: pyfiglet not coming up 
Python :: ImportError: sys.meta_path is None, Python is likely shutting down 
Python :: python print without optional argument 
Python :: python getting line count 
Python :: Django - Knox auth setup 
Python :: numeric up down python tkinter 
Python :: requesting with aiohttp 
Python :: add two dataframes together 
Python :: string format method python 
Python :: using hashlib module in python 
Python :: pearsons correlation calculation 
Python :: python any in string 
Python :: font tkinter combobox 
Python :: how to add array and array python 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =