Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个二维数组,它显示了国家的聚集地图,每个国家都用一个特定的值分割。如何迭代每个集群的值?
New_list= list(set(your_array)) for cluster in New_list: print(cluster) #this gives you 5 and 2