Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python specify typeError output

for var in [a, b, c]:        
  if not isinstance(var, int) :
    raise TypeError('Please make sure all inputs are integers')
# - or -
try:
	print(geeky_list[indices[i]])
except TypeError:
    print("TypeError: Check list of indices")
 
PREVIOUS NEXT
Tagged: #python #typeError #output
ADD COMMENT
Topic
Name
8+6 =