Ubuntu edit key

I’m not able to edit my file in ubuntu, when i edit a file and after when i trying to save it couldn’t save.
Could anyone please sort this out.

@vinayak2003 Could you please specify the error that you are getting after saving the file?

1.For opening a new file or to edit existing file use: sudo nano <your_filename>.py(if its a python file)

2.In order to save your changes use CTRL + X then rename your file, if necessary and finally press ENTER

Hope it helps:)