Skip to main content
6 of 6
Commonmark migration

05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394