The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
kingthrillgore to 196@lemmy.blahaj.zone • 1 year ago

does this code run rule

lemmy.ml

message-square
60
fedilink
295

does this code run rule

lemmy.ml

kingthrillgore to 196@lemmy.blahaj.zone • 1 year ago
message-square
60
fedilink
alert-triangle
You must log in or register to comment.
  • InEnduringGrowStrong
    link
    fedilink
    59•1 year ago

    I mean this would remove False and None from a list though.

    • @bleistift2@feddit.de
      link
      fedilink
      English
      31•1 year ago

      And empty lists, tuples, dictionaries, sets, and strings

    • LostXOR
      link
      fedilink
      4•1 year ago

      results = [result for result in results if result != None]

      • @naught@sh.itjust.works
        link
        fedilink
        22•1 year ago

        Should be is not None (:

        • LostXOR
          link
          fedilink
          3•1 year ago

          You’re right, though IIRC there’s no functional difference when comparing to None (other than speed).

          • @AVincentInSpace@pawb.social
            link
            fedilink
            English
            9•1 year ago

            Yes there is. One invokes __ne__ on the left hand side, the other performs an identity comparison.

    • unalivejoy
      link
      fedilink
      English
      24•
      edit-2
      1 year ago

      results = list(filter(None, results))

    • @lugal@sopuli.xyz
      link
      fedilink
      38•1 year ago

      Also 0 and empty strings

196@lemmy.blahaj.zone

!196@lemmy.blahaj.zone
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
  • 43 users / day
  • 206 users / week
  • 761 users / month
  • 5.14K users / 6 months
  • 1 subscriber
  • 16.5K Posts
  • 193K Comments
  • Modlog
  • mods:
  • Moss
  • @greembow@lemmy.blahaj.zone
  • moss
  • Queue
  • funky-rodent [he/him]
  • Peachy [they/she]
  • @greembow@lemmy.world
  • @remotelove@lemmy.ca
  • Roflmasterbigpimp
  • @A_Very_Big_Fan@lemm.ee
  • qaz
  • @A_Very_Big_Fan@lemmy.world
  • @qaz@lemmy.sdf.org
  • qaz
  • @qaz@sh.itjust.works
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org