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

  • SEARCH
  • Home
  • 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 8816985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:44:37+00:00 2026-06-14T04:44:37+00:00

Why this work for td in alltd: if style3 in td[class] or style4 in

  • 0

Why this work

for td in alltd:
    if "style3" in td["class"] or "style4" in td["class"] or "style1" in td["class"]:
        td["class"] = "s1"

and this not?

for td in alltd:
    if all(x in td["class"] for x in ("style3", "style4", "style1")):
        td["class"] = "s1"
  • 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-14T04:44:39+00:00Added an answer on June 14, 2026 at 4:44 am

    all([x1,x2,...]) is basically the same as x1 and x2 and ..., not x1 or x2 or ...

    >>> all([True, True])
    True
    >>> all([True, False])
    False
    

    Use any() instead.

    >>> any([True,False])
    True
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Will this work for testing whether a value at position index exists or not,
i did this work Tools->Options->Debugging 'Break all processes when one process breaks' is enabled
I can't get this work with MySQL 5.x. This function should return all relevent
Why does this work in design mode but not when I run it: <tr
Why does this work: $('.button_30').click(function(){ $(this).closest('.portlet').find('.portlet_content').text(foo); });​ any why does this not work: $('.button_30').click(function(){
This work: var stepFunc = [ //Step 0 (it doe not exist) function(){console.log(Step 0);},
How can this work as a WCF Service? public class BusinessObject<T> where T :
Would this work on all platforms? i know windows does \r\n, and remember hearing
Why does this work? $('#findme', '<div><div id=findme>Hello</div></div>') And this does not? $('#findme', '<div id=findme>Hello</div>')
How do you make this work: public class Frankenstein<T extends IHuman, IMonster>{ } Without

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.