• enkers
    link
    fedilink
    42
    edit-2
    8 months ago

    This is your brain on python:

    def is_even (num):
         return num in [x*2 for x in range(sys.maxsize / 2)]
    
    • Goddard Guryon
      link
      fedilink
      108 months ago

      That won’t work tho, you need to make it sys.maxsize//2 to coerce the output into int form

        • Goddard Guryon
          link
          fedilink
          18 months ago

          IIRC it doesn’t; that has caused me pain so many times when trying to generate fractional range