If you want to open python files with IDLE you can right click a .py file and select "Open with" - "Choose another app", then select the file \Lib\idlelib\idle.bat in your python installation directory.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.