Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    \$\begingroup\$ -2 bytes by using a while loop instead of exec. \$\endgroup\$ Commented Feb 7, 2021 at 23:26
  • 1
    \$\begingroup\$ 153 following on from ovs: Try it online!, or 152 in Python 3 due to byte literals: Try it online! \$\endgroup\$ Commented Feb 8, 2021 at 0:05
  • \$\begingroup\$ Maybe it could save bytes to use a pseudoprimality test like ~-2**b%b<2 and modify n to include zero digits at the pseudoprime positions? \$\endgroup\$ Commented Feb 10, 2021 at 1:01
  • \$\begingroup\$ @xnor That's a promising idea. I'll see if I can come up with something that's shorter. \$\endgroup\$ Commented Feb 10, 2021 at 1:26
  • \$\begingroup\$ Can you remove a byte by replacing \0 with a literal null byte? \$\endgroup\$ Commented Feb 10, 2021 at 2:45