Write a program which traverses the current working directory recursively and displays those files ending with .py.
Hint : Use walk method of os package.
Hint : Use walk method of os package.
import os if _name_ == "_main_": for files in os.walk("."): if .py in files: print(files)I tried this but am getting error