def leaves(G):
    """
    Return the nodes of G with out-degree zero in a list.

    G-- nx.Digraph

    return-- List of leaves nodes.

    Example:
    >>> G=random_dag(10,20)
    >>> leaves_list=leaves(G)
    >>> len(leaves_list)>0
    True
    >>> any([G.out_degree(x)>0 for x in leaves_list])
    False
    """
    return [node  for (node,od) in G.out_degree() if od==0]