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*

10
  • 1
    \$\begingroup\$ @movatica - you're right, added it \$\endgroup\$ Commented Jun 28, 2019 at 21:36
  • 1
    \$\begingroup\$ Save 1 byte by hardcoding '#' instead of x[0]. \$\endgroup\$ Commented Jun 28, 2019 at 21:37
  • 1
    \$\begingroup\$ You can skip the list comprehension inside ''.join(...), as it also handles a generator expression. Just remove the [] and save 2 more bytes :) \$\endgroup\$ Commented Jun 28, 2019 at 21:42
  • 1
    \$\begingroup\$ Thanks! range(1,6,2) is even better with [1,3,5] \$\endgroup\$ Commented Jun 28, 2019 at 21:47
  • 1
    \$\begingroup\$ Jonathan Allen proposed a different trick for rounding in mz Pzthon3 version. It applies here as well: lambda x:'#'+''.join(hex((int(x[i:i+2],16)+8)/17)[2:]for i in[1,3,5]) -> 69 bytes \$\endgroup\$ Commented Jun 29, 2019 at 7:06