<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edges [(0, 1), (0, 2), (1, 2), (3, 4), (4, 5), (3, 5)], using a community detection algorithm like fast greedy, how can you convert the resulting community structure into a membership list indicating which vertices belong to which communities?
### Response:
import igraph as ig

# Create a graph with communities
edges = [(0, 1), (0, 2), (1, 2), (3, 4), (4, 5), (3, 5)]
g = ig.Graph(edges=edges)

# Detect communities using some community detection method
# Here, we use the fast greedy method as an example
communities = g.community_fastgreedy().as_clustering()

# Convert the community structure into a membership list
membership = ig.community_to_membership(communities)

# Print membership list which shows that vertices 0, 1, 2 are in one community, and 3, 4, 5 in another
print(membership)
<|EOT|>
