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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:33:20+00:00 2026-05-15T19:33:20+00:00

closedset = set() root = (5,6) for u,v in root: if v is not

  • 0
closedset = set()    


root = (5,6)

for u,v in root:
    if v is not closedset:
       closedset.add(root)
       print closedset

Error:

for u,v in root:

TypeError: unpack non-sequence

What should i do with type of error?

  • 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-15T19:33:20+00:00Added an answer on May 15, 2026 at 7:33 pm

    I’m not sure I understand what you’re trying to do. Maybe:

    roots = [(5, 6), (2, 3)]
    
    for u, v in roots:
      if f not in closed:
        closed.add(v)
        print closed
    

    Note a few changes:

    • roots is now a list of tuples. for u, v in roots will correctly “unpack” each tuple into u and v
    • by if v is not closed your probably meant if f not in closed, if closed is a dictionary of some kind
    • if close.add is a method (of a set?), then it has to be called with parens () and not brackets ()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 526k
  • Answers 526k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can do this with a number of different NLP… May 16, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer I'd go with the first option. After all, it's exactly… May 16, 2026 at 10:32 pm
  • Editorial Team
    Editorial Team added an answer There is the ExitWindowsEx Function that can do this. You… May 16, 2026 at 10:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I want to use sets as data structure. how should i make it possible?
My understanding is that the LinqToSql pseudolanguage describes a set using a syntax very
I'm working on a Spring application that simply searches a set of data for
My view model has the property: public IEnumerable<string> Names { get; set; } My
I have two versions of a project. One for Silverlight and one for .NET.
I am adding elements to an XML file during installation using the XmlFile element:
I have the following recursive code and it doesn't behave as expected (see details
i've been working on a problem for a while now, which involves targeting the
I develop some PHP project on Linux platform. Are there any disadvantages of putting
Ada , Pascal and many other languages support ranges, a way to subtype integers.

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.