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*

5
  • \$\begingroup\$ Very nice answer! You can save 2 more bytes by renaming set. \$\endgroup\$ Commented Nov 19, 2019 at 9:08
  • \$\begingroup\$ I've not looked too closely, but you could also almost certainly save a whole bunch of bytes by only indenting each of your blocks by one space. Sure, it makes your code unreadable, but we don't care about readability here. \$\endgroup\$ Commented Nov 19, 2019 at 10:02
  • \$\begingroup\$ @ymbirtt :In python2 (soon to be dead!) both spaces and tab characters are semantic white space, with space taking precedence. So I think you are mistaking those tab characters for 8 spaces. \$\endgroup\$ Commented Nov 19, 2019 at 10:21
  • \$\begingroup\$ @ChasBrown I am indeed! Sorry about the mixup \$\endgroup\$ Commented Nov 19, 2019 at 10:22
  • \$\begingroup\$ You can save 3 bytes by prepending a= to the line starting p,q, then replacing [p,q] with a, and replacing {p,q} with S(a). \$\endgroup\$ Commented Nov 19, 2019 at 19:30