Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

taking string input from user in python with try except

try:
	User_Name = input("What is your name:- ")
	print("Hi "+User_Name+"It's me python")
except:
  print("The user Name Is incorrect")
Comment

PREVIOUS NEXT
Code Example
Python :: matplotlib turn off ticks 
Python :: python smtp email 
Python :: django try catch exception 
Python :: sorting by second element 
Python :: from imblearn.over_sampling import smote error 
Python :: python check if exe is running 
Python :: Inheritance constructor with parameters python 
Python :: generics python 
Python :: pandas map multiple columns 
Python :: replace a string in a list 
Python :: await async function from non async python 
Python :: ipywidegtes dropdown 
Python :: how to make a for loop increment by 2 in python 
Python :: python apply function to dictionary values 
Python :: Python DateTime add days to DateTime object 
Python :: install pip with pacman linux 
Python :: iterate over list and select 2 values together python 
Python :: numpy remove element 
Python :: how to check if email exists in python 
Python :: how to check django rest framework version 
Python :: reset django database 
Python :: using tqdm in for loop 
Python :: python change column order in dataframe 
Python :: swap list items in python 
Python :: index of max in tensor 
Python :: how to add delay in python 
Python :: how to check python version on terminal 
Python :: dir template 
Python :: how to take input in 2d list in python 
Python :: unique id python 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =