Skip to main content
added 67 characters in body
Source Link
Sp3000
  • 61.9k
  • 13
  • 115
  • 287

Python, 44 44 ​ ​42 bytes

lambda s:s[:-1]+"1]+"\/ /\.\/"[ord"[-ord(s[-1])%10%3&3::3]

Replaces the last character with the correspond set of two characters. ideone link

(-2 bytes thanks to @xsot's shorter mapping function)

Python, 44 bytes

lambda s:s[:-1]+" /\.\/"[ord(s[-1])%10%3::3]

Replaces the last character with the correspond set of two characters. ideone link

Python, 44 ​ ​42 bytes

lambda s:s[:-1]+"\/ /\."[-ord(s[-1])&3::3]

Replaces the last character with the correspond set of two characters. ideone link

(-2 bytes thanks to @xsot's shorter mapping function)

Source Link
Sp3000
  • 61.9k
  • 13
  • 115
  • 287

Python, 44 bytes

lambda s:s[:-1]+" /\.\/"[ord(s[-1])%10%3::3]

Replaces the last character with the correspond set of two characters. ideone link