Unicode-Find (5 short lines)
def findRedundantConnection(self, edges):\n        tree = ''.join(map(chr, range(1001)))\n        for u, v in edges:\n            if tree[u] == tree[v]:\n      
    def findRedundantConnection(self, edges):\n        tree = ''.join(map(chr, range(1001)))\n        for u, v in edges:\n            if tree[u] == tree[v]:\n                return [u, v]\n            tree = tree.replace(tree[u], tree[v])\n\nStart with each node being its own tree, then combine trees by adding the edges. The first (and only) edge closing a loop is the last edge in that loop, which is the edge we must return.\n\nMy `tree[u]` denotes the tree of node `u`. I use a string because it has a convenient and fast `replace` method. My title is of course a pun on [Union-Find](https://en.wikipedia.org/wiki/Disjoint-set_data_structure).
[]