Skip to main content
added 2 characters in body
Source Link
Kamehameha
  • 553
  • 3
  • 7

Python 76 6263 Bytes

This anon-function basically prints it's input as is.

lambda x:`[x[( e~~e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x:`[x[( e~e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]
              ^

Outputs - z("123456") -> 123321

Python 76 62 Bytes

This anon-function basically prints it's input as is.

lambda x:`[x[( e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x:`[x[( e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]
              ^

Outputs - z("123456") -> 123321

Python 76 63 Bytes

This anon-function basically prints it's input as is.

lambda x:`[x[(~~e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x:`[x[( ~e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]
              ^

Outputs - z("123456") -> 123321

deleted 12 characters in body
Source Link
Kamehameha
  • 553
  • 3
  • 7

Python 76 6462 Bytes

This anon-function basically prints it's input as is.

lambda x,s=len:`[x[( e,e)[e<s[e<len(x)/2]]for e in range(slen(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x,s=len:`[x[(~e e,e)[e<s[e<len(x)/2]]for e in range(slen(x))]`[2::5]
                    ^

Outputs - z("123456") -> 123321

Python 76 64 Bytes

This anon-function basically prints it's input as is.

lambda x,s=len:`[x[( e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x,s=len:`[x[(~e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]
                    ^

Outputs - z("123456") -> 123321

Python 76 62 Bytes

This anon-function basically prints it's input as is.

lambda x:`[x[( e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x:`[x[( e,e)[e<len(x)/2]]for e in range(len(x))]`[2::5]
              ^

Outputs - z("123456") -> 123321

deleted 12 characters in body
Source Link
Kamehameha
  • 553
  • 3
  • 7

Python 76 7064 Bytes

This anon-function basically prints it's input as is.

lambda x,s=len:`[x[(~~e%s(x) e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x,s=len:`[x[( ~e%s(x)~e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]
                    ^

Outputs - z("123456") -> 123321

Python 76 70 Bytes

This anon-function basically prints it's input as is.

lambda x,s=len:`[x[(~~e%s(x),e)[e<s(x)/2]]for e in range(s(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x,s=len:`[x[( ~e%s(x),e)[e<s(x)/2]]for e in range(s(x))]`[2::5]
                    ^

Outputs - z("123456") -> 123321

Python 76 64 Bytes

This anon-function basically prints it's input as is.

lambda x,s=len:`[x[( e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]

Outputs - z("123456") -> 123456

But by changing the ~ to whitespace , it prints the second part of the string in reverse.

lambda x,s=len:`[x[(~e,e)[e<s(x)/2]]for e in range(s(x))]`[2::5]
                    ^

Outputs - z("123456") -> 123321

deleted 12 characters in body
Source Link
Kamehameha
  • 553
  • 3
  • 7
Loading
deleted 15 characters in body
Source Link
Kamehameha
  • 553
  • 3
  • 7
Loading
Source Link
Kamehameha
  • 553
  • 3
  • 7
Loading