Maybe some code maintenance can be piggybacked.

```python
for i, component in enumerate(scc):
    mapping.update((n, i) for n in component)
number_of_components = i + 1
C.add_nodes_from(range(number_of_components))
C.add_edges_from((u, v) for u, v in G.edges_iter()
                 if mapping[u] != mapping[v])
```