Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 349 characters in body
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 5 bytes

Ż"!ṁż

A full program accepting a string, which prints the result.

Try it online!

How?

Ż"!ṁż - Main Link: list of characters, s e.g. "abc"
 "! - character '!' '!'
 ṁ - mould like:
Ż - s with a zero prepended "!!!!"
 ż - zip together with s ["!a","!b","!c",'!']
 - implicit (smashing) print !a!b!c!

Jelly, 5 bytes

Ż"!ṁż

A full program accepting a string, which prints the result.

Try it online!

Jelly, 5 bytes

Ż"!ṁż

A full program accepting a string, which prints the result.

Try it online!

How?

Ż"!ṁż - Main Link: list of characters, s e.g. "abc"
 "! - character '!' '!'
 ṁ - mould like:
Ż - s with a zero prepended "!!!!"
 ż - zip together with s ["!a","!b","!c",'!']
 - implicit (smashing) print !a!b!c!
Source Link
Jonathan Allan
  • 115.4k
  • 8
  • 68
  • 293

Jelly, 5 bytes

Ż"!ṁż

A full program accepting a string, which prints the result.

Try it online!

AltStyle によって変換されたページ (->オリジナル) /