2014-04-02 10 views

risposta

5

Ok, ho trovato. I post la risposta, se qualcuno ha bisogno di una risposta alla mia domanda:

for i in tree.get_children(): 
    tree.delete(i) 
25

Ancora più semplice:

tree.delete(*tree.get_children()) 
+0

Perché il '*' lì? – buhtz

+1

È l'operatore "splat": vedere [questa domanda] (https://stackoverflow.com/questions/2322355/proper-name-for-python-operator) –

Problemi correlati