MTGZone
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
kingthrillgore@lemmy.ml to 196@lemmy.blahaj.zone · 1 year ago

does this code run rule

lemmy.ml

message-square
44
fedilink
295

does this code run rule

lemmy.ml

kingthrillgore@lemmy.ml to 196@lemmy.blahaj.zone · 1 year ago
message-square
44
fedilink
  • itslilith@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    1 year ago

    It does! it takes a list (or other iterator) and filters out all values that are cast to boolean True. The same could be archived with

    results = list(filter(bool, results))
    
    • kakes@sh.itjust.works
      link
      fedilink
      arrow-up
      12
      ·
      1 year ago

      It would filter out values that cast to False, no?

      • lugal@sopuli.xyz
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Like None, 0, “”, …

      • itslilith@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        i wasn’t sure how to phrase it, it keeps all values that cast to True, and discards all that cast to False

196@lemmy.blahaj.zone

196@lemmy.blahaj.zone

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !196@lemmy.blahaj.zone

Be sure to follow the rule before you head out.


Rule: You must post before you leave.



Other rules

Behavior rules:

  • No bigotry (transphobia, racism, etc…)
  • No genocide denial
  • No support for authoritarian behaviour (incl. Tankies)
  • No namecalling
  • Accounts from lemmygrad.ml, threads.net, or hexbear.net are held to higher standards
  • Other things seen as cleary bad

Posting rules:

  • No AI generated content (DALL-E etc…)
  • No advertisements
  • No gore / violence
  • Mutual aid posts are not allowed

NSFW: NSFW content is permitted but it must be tagged and have content warnings. Anything that doesn’t adhere to this will be removed. Content warnings should be added like: [penis], [explicit description of sex]. Non-sexualized breasts of any gender are not considered inappropriate and therefore do not need to be blurred/tagged.

If you have any questions, feel free to contact us on our matrix channel or email.

Other 196’s:

  • !196@lemmy.world
  • !onehundredninetysix@lemmy.blahaj.zone
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.56K users / day
  • 3.31K users / week
  • 6.38K users / month
  • 18.8K users / 6 months
  • 8 local subscribers
  • 17.6K subscribers
  • 18.1K Posts
  • 217K Comments
  • Modlog
  • mods:
  • Moss@lemmy.blahaj.zone
  • greembow@lemmy.blahaj.zone
  • moss@lemmy.world
  • Queue@beehaw.org
  • funky-rodent [he/him]@lemmy.blahaj.zone
  • Peachy [they/she] @lemmy.blahaj.zone
  • threegnomes@lemmy.blahaj.zone
  • greembow@lemmy.world
  • remotelove@lemmy.ca
  • Roflmasterbigpimp@feddit.de
  • A_Very_Big_Fan@lemm.ee
  • qaz@lemmy.blahaj.zone
  • A_Very_Big_Fan@lemmy.world
  • qaz@lemmy.sdf.org
  • qaz@lemmy.world
  • qaz@sh.itjust.works
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org