Is it possible to use try without except? Sometimes it doesn't matter if some iterations crash, but using conditions (maybe more than one) looks weirdly
# in my dreams:
for i in lines:
try:
print(i[3])
Is it possible to use try without except? Sometimes it doesn't matter if some iterations crash, but using conditions (maybe more than one) looks weirdly
# in my dreams:
for i in lines:
try:
print(i[3])
Try needs an except
or finally
block following it. If you want to leave it empty, try this
try:
/*Your code here*/
except:
pass
EDIT: If you're confident that your block won't raise an exception, you could just remove the try block altogether
for i in lines:
print(i[3])