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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:11:39+00:00 2026-05-26T22:11:39+00:00

The list signals_by_date stores tuples and each tuple contains 15 numbers. For each tuple

  • 0

The list signals_by_date stores tuples and each tuple contains 15 numbers. For each tuple within signals_by_date, I want to remove numbers that don’t satisfy certain criteria. For some reason, no matter what constraints I put in the list comprehension, I’m always left with 7 numbers in each tuple. In the code example below, all numbers are less than 3, so I would expect each tuple to be empty. What am I doing wrong? Many thanks.

    signals_by_date = []
    for i in range(0, 1):
        temp_signals = []
        for symbol in symbols:        
            for signal in signals_by_symbol[symbol]:
            temp_signals.append(signal[i]-1)
        signals_by_date.append(temp_signals)
        [signals_by_date[i].remove(v) for v in signals_by_date[i] if v < 3]
  • 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-26T22:11:40+00:00Added an answer on May 26, 2026 at 10:11 pm

    The last line should read:

    signals_by_date[i] = [v for v in signals_by_date[i] if v >= 3]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I have in my project is the binary file that contains list of
List Comprehension for me seems to be like the opaque block of granite that
List Comprehension is a very useful code mechanism that is found in several languages,
List comprehensions can be useful in certain situations, but they can also be rather
List<MyClass> myclassList = (List<MyClass>) rs.get(); TreeSet<MyClass> myclassSet = new TreeSet<MyClass>(myclassList); I don't understand why
Without keeping a list of current threads, I'm trying to see that a realtime
I want to write a screenshot app that grabs a screen shot, saves it
I have a view that displays a list of models. Some of the properties
Let say i have a list List and i have pthread_t t1 that polls
I have a list of items I want to output as the contents 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.