Pattern matching using Z algorithm in Python | Hacker News Reader