Skip to main content
Commonmark migration
Source Link

Pyth, 8 bytes

+\!s+R\!

#Pyth, 8 bytes +!s+R! Try it online!


     Code | Explanation
----------+-------------------------------------
+\!s+R\!  | Code
+\!s+R\!Q | with implicit variables filled
----------+-------------------------------------
     R  Q | For each d in input, replace d with:
    +R\!  |  d+"!"
   s      | Join results on empty string
+\!       | Add "!" to beginning
          | Print (implicit)

#Pyth, 8 bytes +!s+R! Try it online!


     Code | Explanation
----------+-------------------------------------
+\!s+R\!  | Code
+\!s+R\!Q | with implicit variables filled
----------+-------------------------------------
     R  Q | For each d in input, replace d with:
    +R\!  |  d+"!"
   s      | Join results on empty string
+\!       | Add "!" to beginning
          | Print (implicit)

Pyth, 8 bytes

+\!s+R\!

Try it online!


     Code | Explanation
----------+-------------------------------------
+\!s+R\!  | Code
+\!s+R\!Q | with implicit variables filled
----------+-------------------------------------
     R  Q | For each d in input, replace d with:
    +R\!  |  d+"!"
   s      | Join results on empty string
+\!       | Add "!" to beginning
          | Print (implicit)
Source Link
hakr14
  • 5k
  • 1
  • 11
  • 18

#Pyth, 8 bytes +!s+R! Try it online!


     Code | Explanation
----------+-------------------------------------
+\!s+R\!  | Code
+\!s+R\!Q | with implicit variables filled
----------+-------------------------------------
     R  Q | For each d in input, replace d with:
    +R\!  |  d+"!"
   s      | Join results on empty string
+\!       | Add "!" to beginning
          | Print (implicit)