B
B
bbrk2016-01-29 14:29:28
Python
bbrk, 2016-01-29 14:29:28

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

2 answer(s)
D
Denis Sh, 2016-01-29
@Deq56

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()))

V
Vov Vov, 2016-02-07
@balamut108

Привет, вот тут посмотри https://github.com/balamut108/tournament_generator, кажется то что нужно. Буду признателен, если внесёшь свой вклад.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question