![taberror inconsistent use of tabs and spaces in indentation taberror inconsistent use of tabs and spaces in indentation](https://i.stack.imgur.com/wK4yb.jpg)
- #Taberror inconsistent use of tabs and spaces in indentation how to#
- #Taberror inconsistent use of tabs and spaces in indentation code#
Its my understanding that python should work with either as longs your code is consistent and doesnt mix tabs and spaces for indentation. Posting homework assignments is not prohibited if you show that you tried to solve it yourself. TabError: inconsistent use of tabs and spaces in indentation Sun 2:09 am I am new to python. Either the example compiles cleanly, or causes the exact error message about which you want help.Īvoid posting a lot of code in your posts. Include the error you get when running the code, if there is one.Įnsure your example is correct.
![taberror inconsistent use of tabs and spaces in indentation taberror inconsistent use of tabs and spaces in indentation](https://ewr1.vultrobjects.com/imgur/000/010/352/005_346_1c1_thumb.png)
You may need to change the space/tab settings in your text editor if its set to auto-convert any of these characters. Note, the PEP8 style guide for Python recommends using 4 spaces for indentation instead of tabs. SSCCE Keep your code Short, Self Contained, Correct (Compilable) and provide Example in Atom, the Whitespace: Convert Tabs to Spaces command that you can find with Cmd+Shift+P works nicely. Your code is hard to read and test otherwise.īe sure to try out suggestions you get and report back. Proofread your answers for clarity and correctness.įormat your code for reddit or use a site like github or pastebin. Try to guide OP to a solution instead of providing one directly.Īnswer the question and highlight side-issues if any exist.ĭon't "answer and run", be prepared to respond to follow up questions. in Atom, the Whitespace: Convert Tabs to Spaces command that you can find with Cmd+Shift+P works nicely. r/Python /r/madeinpython /r/programmingbuddies /r/pythontips /r/flask /r/django /r/pygame /r/programming /r/learnprogramming /r/dailyprogrammer Guidelines Commenting To fix, convert all tabs to 4 spaces in your text editor.
#Taberror inconsistent use of tabs and spaces in indentation how to#
Guide on how to join and different IRC clients: /wiki/IRCĪll learning resources are in the wiki: /r/learnpython/w/indexįrequently Asked Questions: /r/learnpython/w/FAQ Join us in the IRC channel: #learnpython on libera.chat
![taberror inconsistent use of tabs and spaces in indentation taberror inconsistent use of tabs and spaces in indentation](https://community.dataquest.io/uploads/default/original/2X/4/42bfb5a157e5e87417026a3e4c70341a95a905a2.png)