Ask coding questions

← Back to all posts
what the heck happened with python
[deleted]

please help, it wont work ive tried every indent level

Answered by Bookie0 (6182) [earned 5 cycles]
View Answer
Comments
hotnewtop
Bookie0 (6182)

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 (17614)

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

[deleted]

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

[deleted]

@Coder100

you can't select two answers as right (don't ask how i found this)