Search Results

Search found 1 results on 1 pages for 'user2901061'.

Page 1/1 | 1 

  • Unique elements of list within list in python

    - by user2901061
    We are given a list of animals in different zoos and need to find which zoos have animals that are not in any others. The animals of each zoo are separated by spaces, and each zoo is originally separated by a comma. I am currently enumerating over all of the zoos to split each animal and create lists within lists for different zoos as such: for i, zoo in enumerate(zoos): zoos[i] = zoo.split() However, I then do not know how to tell and count how many of the zoos have unique animals. I figure it is something else with enumerate and possibly sets, but cannot get it down exactly. Any help is greatly appreciated. Thanks

    Read the article

1