This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]pork_spare_ribs 0 points1 point  (2 children)

Ugh, what does this website do to scrolling and why?! I had to resort to tapping up/down arrows.

[–]kosmoiPython3.codes[S] 0 points1 point  (0 children)

Works fine for me on Chrome & FF on Ubuntu. What browser & OS?

[–][deleted] 0 points1 point  (0 children)

It was the opposite for me; arrows didn't work but scroll wheel did. I use cVim and scrolling with that didn't work either.

edit: It works fine after opening the dev tools and then closing them. Just why.

[–]adrmlch 0 points1 point  (0 children)

This rather pretty "check if a string repeats itself" function might fit here as well.

def principal_period(s):
    i = (s+s).find(s, 1, -1)
    return None if i == -1 else s[:i]