2

Ok , so for some days i continously get this error and i make simple python problems and this still comes out of nowhere i really dont understand what i m wrong with

def counterpartCharCode(char):
    a = char.upper()
    b = char.lower()
    if char == a:
        return ord(b)
    else:
        return ord(a)

print(counterpartCharCode("A"))

File "e:/salut.py", line 3 b = char.lower() ^ IndentationError: unindent does not match any outer indentation level

gabi2000
  • 35
  • 3

1 Answers1

4

You have mixed tabs and spaces, a mortal sin. Editing your code I see

SSSTa = char.upper()
SSSSb = char.lower()

where S is space and T is tab.

mCoding
  • 2,304
  • 4
  • 7