Ask coding questions

← Back to all posts
what the heck happened with python
AJDevelopment (68)

please help, it wont work ive tried every indent level

Answered by Bookie0 (4466) [earned 5 cycles]
View Answer
Commentshotnewtop
Bookie0 (4466)

hi!

not sure, but maybe line 58 except IndexError: should be at the same indentation level as line 55 try:, because dont try and except go together in a way? so just select lines 58 to 60 (inclusive), and pres shift-tab two times (except should be at the same line as try); maybe that could solve it...?

Coder100 (10540)

Hi! Try except errors have to be on the same indentation sequence.

try:
  pass
except:
  pass

also line 60 is unreachable btw because line 59

AJDevelopment (68)

@Coder100 i was going to checkmark your answer but it didnt work because i already selected Bookie0's answer. Sorry.