I have a script that creates a new collection but if I run it again it adds a new collection named "Personal Collection.001" and so on, what I would like to tell to the script is that if that collection name is in the scene then don't make a new one.
import bpy
myCol = bpy.data.collections.new('Personal collection')
bpy.context.scene.collection.children.link(myCol) #Creates a new collection
for myCol in bpy.data.collections:
if myCol.name == "Personal Collection":
print ("Collection found in scene")
Cheers, Juan