Saving Sensors Measurements

Hello All,
How can i save the data i'm receiving on Node-Red into a python file on my raspberry pi?
i'm a newbie on this and i'm wondering how is it possible

Welcome to the forum @ghada1

What exactly do you mean by saving it into a python file? A python file is a file containing python code.

If you just want to write it to a file you can use the Write File node to do that.

What do you want to do with the data once you have saved it somewhere?