Skip to main content
added 30 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Python 3, 74 62 58 4444 40 bytes

-12 bytes thanks to Erik the Outgolfer. -18 bytes thanks to Leaky Nun. -4 bytes thanks to musicman523.

Takes input as a bytestring.

lambda s:chr(min(*{*range(s[0],s[-1])}-{*s}))

Try it online!Try it online!

Another cool solution:

lambda s:chr(min(*{*range(*s[::~-len(s)])}-{*s}))

Python 3, 74 62 58 44 bytes

-12 bytes thanks to Erik the Outgolfer. -18 bytes thanks to Leaky Nun.

Takes input as a bytestring.

lambda s:chr(min({*range(s[0],s[-1])}-{*s}))

Try it online!

Another cool solution:

lambda s:chr(min({*range(*s[::~-len(s)])}-{*s}))

Python 3, 74 62 58 44 40 bytes

-12 bytes thanks to Erik the Outgolfer. -18 bytes thanks to Leaky Nun. -4 bytes thanks to musicman523.

Takes input as a bytestring.

lambda s:chr(*{*range(s[0],s[-1])}-{*s})

Try it online!

Another cool solution:

lambda s:chr(*{*range(*s[::~-len(s)])}-{*s})
added 66 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Python 3, 74 62 5858 44 bytes

-12 bytes thanks to Erik the Outgolfer. -418 bytes thanks to Leaky Nun.

Takes input as a bytestring.

lambda s:chr(min({*map(chr,range(ord*range(s[0]),ord(s[-1])))}-{*s}))

Try it online!Try it online!

Another cool solution:

lambda s:chr(min({*range(*s[::~-len(s)])}-{*s}))

Python 3, 74 62 58 bytes

-12 bytes thanks to Erik the Outgolfer. -4 bytes thanks to Leaky Nun.

lambda s:min({*map(chr,range(ord(s[0]),ord(s[-1])))}-{*s})

Try it online!

Python 3, 74 62 58 44 bytes

-12 bytes thanks to Erik the Outgolfer. -18 bytes thanks to Leaky Nun.

Takes input as a bytestring.

lambda s:chr(min({*range(s[0],s[-1])}-{*s}))

Try it online!

Another cool solution:

lambda s:chr(min({*range(*s[::~-len(s)])}-{*s}))
deleted 12 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88

Python 3, 74 6262 58 bytes

-12 bytes thanks to Erik the Outgolfer. -4 bytes thanks to Leaky Nun.

lambda s:''.joinmin({*map(chr,range(ord(s[0]),ord(s[-1])))}-{*s})

Try it online!Try it online!

Python 3, 74 62 bytes

-12 bytes thanks to Erik the Outgolfer.

lambda s:''.join({*map(chr,range(ord(s[0]),ord(s[-1])))}-{*s})

Try it online!

Python 3, 74 62 58 bytes

-12 bytes thanks to Erik the Outgolfer. -4 bytes thanks to Leaky Nun.

lambda s:min({*map(chr,range(ord(s[0]),ord(s[-1])))}-{*s})

Try it online!

deleted 12 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading
Source Link
totallyhuman
  • 17.3k
  • 3
  • 32
  • 88
Loading