To create a .rpy file you first need to enable file extensions in your os.
If you are on windows, it's like this
Otherwise I'm sure you can find how to do it with a quick internet search.
Then just create a text file and change the .txt to . rpy
I don't know exactly what you are planing to do but you will probably need some knowledge about coding in python, otherwise you will either make something that doesn't do anything or create a buggy mess.
Also to make or edit .rpy files I would suggest using notepad++ or something similar rather than the basic notepad app.
PS : you can use unren to decompile .rpa and .rpyc files to get the .rpy files.