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 8410849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:17:11+00:00 2026-06-10T00:17:11+00:00

I get TypeError: iterable argument required when i try to execute the code below:

  • 0

I get “TypeError: iterable argument required” when i try to execute the code below:

for i in range(len(SE_FE_Lists)):                    
    print "** ", SE_FE_Lists[i]["List_contents"]
    if ":" in SE_FE_Lists[i]["List_contents"]:
        print ": ", SE_FE_Lists[i]
        print "*--* ", SE_FE_Lists[i]["List_contents"]
    if " " in SE_FE_Lists[i]["List_contents"]:
        print "Space :", SE_FE_Lists[i]
        print "*--* ", SE_FE_Lists[i]["List_contents"]    

The error is located in the line if “:” in List[i][“List_contents”]:

The contents of the list :

[{'List_selection': 'List1', 'List_contents': '1:4'}, {'List_selection': 'List2', 'List_contents': '1 2 4'}, {'List_selection': 'List3',
 'List_contents': 1}]

As output i get :

**  1:4

:  {'List_selection': 'List1', 'List_contents': '1:4'}

*--*  1:4

**  1 2 4

Space : {'List_selection': 'List2', 'List_contents': '1 2 4'}

*--*  1 2 4

**  1

Thanks.

  • 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-06-10T00:17:12+00:00Added an answer on June 10, 2026 at 12:17 am

    First, if you want to iterate over items of your object List, you should use the pythonic way of doing it :

    for item in List:
    
        if ":" in item["List_contents"]:
            print "*--* ", item["List_contents"]
        if " " in item["List_contents"]:
            print "*--* ", item["List_contents"]  
    

    for the error you encounter, it looks like your List object is not a dictionnary list.

    EDIT :

    after your edition, the problem is due to the last item of your List : {'List_selection': 'List3', 'List_contents': 1}, here the member ‘List_contents’ is an integer, and python can’t find “:” in an integer…
    If you can’t modify the content of the list, try to force python to use a string with the str() method :

    if ":" in str(item["List_contents"]):
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error: TypeError: object.__init__() takes no parameters when running my code, I
According to should.js Spec this should work: should.strictEqual(shape.code, code) but I get: TypeError: Object
var data = {}; .... data[someprop][someotherprop] = 'bla bla' I get Uncaught TypeError: Cannot
I get this error TypeError at /debate/1/ get_context_data() takes exactly 2 arguments (1 given)
I get an incomplete type error when trying to compile my code. I know
Why do I get the following error in my app Caught TypeError while rendering:
If I call QApplication's init without arguments i get TypeError: arguments did not match
Please point where a bug in my code. class Foo: def get(self): return self.a
We all get TypeError #1009 Cannot access a property or method of a null
If uncomment body.children().each(calc_deep(1)); then i get TypeError: Object [object Window] has no method 'attr'

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.