Skip to main content
added 169 characters in body
Source Link
MilkyWay90
  • 2.7k
  • 2
  • 17
  • 35

Python 2, 51 49 45 42 bytes

lambda x:"".join(`ord(i)+4`[1:]for i in x) 

Try it online!

Golfed to 49 bytes because .join will accept generators too

Golfed to 45 bytes because of lambdas

Golfed to 42 bytes because of switching to Python 2 and using `` (repr)

EXPLANATION:

Uses the trick in the 05AB1E answer.

lambda x: Declare a lambda accepting the string "".join( Join by the empty string ` Repr (string representation)... ord( Unicode codepoint (A -> 65, a -> 97) i The iterator in the for loop ) + 4 Added by 4 ` [1:] With the first character removed ) for i in x While a char i is in the string x 

Python 2, 51 49 45 42 bytes

lambda x:"".join(`ord(i)+4`[1:]for i in x) 

Try it online!

Golfed to 49 bytes because .join will accept generators too

Golfed to 45 bytes because of lambdas

Golfed to 42 bytes because of switching to Python 2 and using `` (repr)

Python 2, 51 49 45 42 bytes

lambda x:"".join(`ord(i)+4`[1:]for i in x) 

Try it online!

Golfed to 49 bytes because .join will accept generators too

Golfed to 45 bytes because of lambdas

Golfed to 42 bytes because of switching to Python 2 and using `` (repr)

EXPLANATION:

Uses the trick in the 05AB1E answer.

lambda x: Declare a lambda accepting the string "".join( Join by the empty string ` Repr (string representation)... ord( Unicode codepoint (A -> 65, a -> 97) i The iterator in the for loop ) + 4 Added by 4 ` [1:] With the first character removed ) for i in x While a char i is in the string x 
added 169 characters in body
Source Link
MilkyWay90
  • 2.7k
  • 2
  • 17
  • 35

#Python - 51 49 bytes

Python 2, 51 49 45 42 bytes

lambda x:"".join(`ord(i)+4`[1:]for i in x) 

print("".join(str(ord(i)+4)[1:]for i in input()))Try it online!

Explanation:

str(ord(i)+4)[1:]for i in input() #Called generators in Python. Used the 05AB1E answer trick for this. "".join then combines it all into a string. print() prints out the resulting string. 

Golfed to 49 bytes because .join will accept generators too

Golfed to 45 bytes because of lambdas

Golfed to 42 bytes because of switching to Python 2 and using `` (repr)

#Python - 51 49 bytes

print("".join(str(ord(i)+4)[1:]for i in input()))

Explanation:

str(ord(i)+4)[1:]for i in input() #Called generators in Python. Used the 05AB1E answer trick for this. "".join then combines it all into a string. print() prints out the resulting string. 

Golfed to 49 bytes because .join will accept generators too

Python 2, 51 49 45 42 bytes

lambda x:"".join(`ord(i)+4`[1:]for i in x) 

Try it online!

Golfed to 49 bytes because .join will accept generators too

Golfed to 45 bytes because of lambdas

Golfed to 42 bytes because of switching to Python 2 and using `` (repr)

added 40 characters in body
Source Link
MilkyWay90
  • 2.7k
  • 2
  • 17
  • 35

#Python - 5151 49 bytes

print("".join([strstr(ord(i)+4)[1:]for i in input()]))

Explanation:

str(ord(i)+4)[1:]for i in input() #Called generators in Python. Used the 05AB1E answer trick for this. [] then converts it to an array. "".join then combines it all into ana arraystring. print() prints out the resulting string. 

Golfed to 49 bytes because .join will accept generators too

#Python - 51 bytes

print("".join([str(ord(i)+4)[1:]for i in input()]))

Explanation:

str(ord(i)+4)[1:]for i in input() #Called generators in Python. Used the 05AB1E answer trick for this. [] then converts it to an array. "".join then combines it all into an array. print() prints out the resulting string. 

#Python - 51 49 bytes

print("".join(str(ord(i)+4)[1:]for i in input()))

Explanation:

str(ord(i)+4)[1:]for i in input() #Called generators in Python. Used the 05AB1E answer trick for this. "".join then combines it all into a string. print() prints out the resulting string. 

Golfed to 49 bytes because .join will accept generators too

Source Link
MilkyWay90
  • 2.7k
  • 2
  • 17
  • 35
Loading