Repeated Sub-String Pattern

Published by Evgeny SH in

Create a solution that checks if a given string consists of a sub-string pattern repeated multiple times to return True or False.

Examples

repeated("a") ➞ False

repeated("ababab") ➞ True

repeated("aba") ➞ False

repeated("abcabcabcabc") ➞ True

repeated("aaxxtaaxztaaxxt") ➞ False

Notes

Adroit programmers can solve this in one line.

Watch a quick demo on how Edabit works.