Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

List change after copy Python

#You need Cluster instance's attribute named pixels:

def printCluster(cl):
    print("---------------")
    print("(" + str(cl.meanColor.r) + "," + str(cl.meanColor.g) + "," + str(cl.meanColor.b) + ")")
    print("I have " + str(len(pixels)) + " pixels.")
    for px in cl.pixels:
        print("(" + str(px.point.x) + "," + str(px.point.y) + ") (" + str(px.color.r) + "," + str(px.color.g) + "," + str(px.color.b) + ")")

 
PREVIOUS NEXT
Tagged: #List #change #copy #Python
ADD COMMENT
Topic
Name
4+2 =