How do I check for multiple exceptions in Python? -
dnasequence = "laksjfklsajdfklsajfklasjfklsad"
while true: lmerlength = input("please enter length of l-mers of universal array :") try: if len(dnasequence) >= lmerlength > 0: break except syntaxerror: pass #this not working. how check multiple exceptions in python? except nameerror: pass print "error: please check input. entered invalid input."
here how check multiple exceptions.
try:
..............
except (syntaxerror, nameerror, ...):
..............
finally:
.............
Comments
Post a Comment