I am not sure about the usage of "pyc" files, but your update changes the logic slightly.

before: matches any file extension that contains "pyc"

after: file extension is exactly "pyc"