I do not understand the ordering what Python applies from holding sets. For example:
visited = set()
visited.add('C')
visited.add('A')
visited.add('B')
print(set)
The ordering is 'A', 'C', 'B'
. Why 'A' is before 'C' (maybe alphabetical order)?
What I have to do in order to preserve the adding ordering, i.e. 'C', 'A', 'B'
?