Answer the question
In order to leave comments, you need to log in
How to display a list as a tree in Python?
I want to write a program for the draw of athletes. But he got stuck. I don't know how best to do this.
I think through built-in lists with subsequent sorting and output of pairs with the given parameters.
And I would also like to display it in the form of a tree, but somehow I’ll figure out how to do it. Maybe someone can give some good advice.
Answer the question
In order to leave comments, you need to log in
people= {"men_1": {"Year": 1, "b":2}, "men_2": {"Year": 1, "b":2},}
p1 = random.choice(list(people. keys()))
people.pop(p1)
p2 = random.choice(list(people.keys()))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question