Skip to main content
5 of 7
deleted 1018 characters in body
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384

#05AB1E, 15 13 12 bytes

₄4°ŸʒD0åôO9Q

-2 bytes thanks to @Emigna
-1 byte thanks to @Grimy

Try it online.

Explanation:

₄4°Ÿ             # Create a list in the range [1000,10000]
    ʒ            # Filter this list by:
     D           #  Duplicate the current number
      0å         #  Check if the number contains a 0 (1 if truthy; 0 if falsey)
        ô        #  Split the duplicated number into parts of that size
                 #   i.e. 1020 is truthy, so becomes [1,0,2,0]
                 #   i.e. 1234 is falsey, so becomes ["0"]
         O       #  Sum that list
          9Q     #  And check if it's equal to 9
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384