The Python Oracle

How can I tell if a string repeats itself in Python?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Ancient Construction

--

Chapters
00:00 Question
01:44 Accepted answer (Score 595)
02:44 Answer 2 (Score 184)
05:17 Answer 3 (Score 91)
07:33 Answer 4 (Score 89)
10:54 Thank you

--

Full question
https://stackoverflow.com/questions/2948...

Accepted answer links:
[Community Wiki answer]: https://stackoverflow.com/a/29482936/244...

Answer 2 links:
[+?]: https://docs.python.org/3/library/re.htm...
[re.match()]: https://docs.python.org/3/library/re.htm...
[re.fullmatch()]: https://docs.python.org/3/library/re.htm...
[re.search()]: https://docs.python.org/3/library/re.htm...

Answer 4 links:
[Python chatroom]: https://chat.stackoverflow.com/rooms/6/p...
[here]: http://paste.ubuntu.com/10765231/
[this]: https://stackoverflow.com/questions/2948...
[David Zhang's solution]: https://stackoverflow.com/a/29489919
[image]: https://i.stack.imgur.com/Xx34F.png
[image]: https://i.stack.imgur.com/KZgxr.png
[image]: https://i.stack.imgur.com/w0qqT.png
[here]: https://bitbucket.org/snippets/schesis/n...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #string #patternmatching

#avk47