How to make a list of materials with colorramp?

I have a script which list all materials with a color ramp in the System Console.
But as you can see, it displays the same material several times (because I have several objects with the same material) So its not a usable list for me.
What should I add/how should I do the script so it will list each material name with a colorramp only once?’

this is really more of a basic Python question rather than Blender-centric, but you can make a list unique by converting it to a set.

unique_list = list(set(my_big_list))
1 Like

I shared a snippet of how to do this in your other thread: