-1

I'm studying the basics of python and I'm having an indentation issue. When I try to run a code on GitBash it gives me the error:

$ python organize_photos.py


File "organize_photos.py", line 7
    if place not in places:
                          ^
TabError: inconsistent use of tabs and spaces in indentation

So i checked my code on Notepad++ and it is giving me some problem on line 7,

enter image description here

but to me the indentation looks fine, what could be the problem?

1 Answers1

1

Python doesn't like a mixture of tabs and spaces. Personally I prefer to use spaces as they render the same on any system.
I see you're using Notepad++, you can head to Settings > Preferences > Language > Tab Settings and convert all tabs to spaces.

Alexis Lucattini
  • 1,211
  • 9
  • 13