Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6916347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:35:27+00:00 2026-05-27T09:35:27+00:00

This is a really basic question, but what is wrong with this code? for

  • 0

This is a really basic question, but what is wrong with this code?

for row in rows:
    if row["Type"] = 'DEADLINE':
        print (row["Title"])

I get the error TabError: inconsistent use of tabs and spaces in indentation pointing to the colon at the end of the if.

Sorry if this is too newbie for SO, but I cant determine if its an issue with going from 2.x python to 3.x or if it’s just syntax I have yet to learn.

Thanks

EDIT: Problem solved. I didn’t realize my text editor had it’s ‘turn tabs into spaces’ feature turned off. So yes, it was a mix of tabs and spaces. I assumed the message meant I had an inconsistant use of whitespace in general, like there were too many spaces or something.

And yes, i realize the single = is a syntactic error, it was something I was trying to remove the TabError, but is obviously wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:35:28+00:00Added an answer on May 27, 2026 at 9:35 am

    You are probably mixing tabs and spaces for your indentation, just like the error message says.

    Some editors have the annoying habit of replacing 8 spaces by a tab automatically, so your code might actually look like this:

    for row in rows:
        if row["Type"] = 'DEADLINE':
    ->print (row["Title"])
    

    where -> represents a tab character.

    Tell your editor to make tabs visible, and not to replace spaces again.

    Alternatively, consistently indent using one tab per indent level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a really basic question but... I have some code like this var
This is a really basic question but this is the first time I've used
Sorry if this is a really basic question but it's been really getting to
This feels like a really basic question, but I can't figure it out anyway..
This is a really basic regex question but since I can't seem to figure
this is a really basic jQuery question, but i'm not sure how to do
This might be a really basic question but how do I create default values
Please do flog me for this really basic question, but I still can not
OK, so I know this question seems really basic, but I can't find a
This is probably a really basic question - but I have a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.