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 Revisions

5 of 5
deleted 920 characters in body
naffetS
  • 13.1k
  • 2
  • 22
  • 54

Vyxal s, 12 bytes

ṫ$RǐR5‛_-ẎYp

Try it Online!

-5 bytes thanks to emanresuA

How?

ṫ$RǐR5‛_-ẎYp
ṫ # Tail extract, push a[:-1] and a[-1]
 $ # Swap
 R # Reverse each
 ǐ # Capitalize first letter of each
 R # Reverse each
 5 # Push length without popping
 ‛_- # Push "_-"
 Ẏ # Extend this string to the length
 Y # Interleave the list of words and each character of this string together
 p # Append the last item of the input (pushed earlier by tail extract) to this list
 # s flag joins this list to a string
naffetS
  • 13.1k
  • 2
  • 22
  • 54

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