Super-annoying indent error (Python) [closed]
the classic unexpected indent error. Here's the relevant code. The question is how do I fix it?
def getNum():
firstNum = input("Please state what number to start at: ")
secondNum = input("Please state swhat number to end at: ")
if countingSubmenu == 3 or countingSubmenu == 4:
thirdNum = input("Please state what increment you would want to go up by: ")
return firstNum, secondNum, thirdNum
else:
return firstNum, secondNum
if option == 1:
getNum(firstNum, secondNum, thirdNum)
for x in range(firstNum, secondNum+1, 1):
print x
print "End of test." #def getNum():
These three lines are using tabs instead of spaces:
return firstNum, secondNum, thirdNum
else:
return firstNum, secondNum
You can see this pretty easily by attempting to edit the question, the tabs show up with a width of 8 spaces.
精彩评论