Hello Vivek Vijay Patil,
Welcome to the Microsoft Q&A forum.
To retrieve a list of GUIDs for the scanned assets in Microsoft Purview, you can utilize the REST API. The below Techlink documents have the details on how to use the REST API in Python.
I hope this helps. Please let me know if you have any further questions.