It fails because edges is a method. The documentation says to do this like: G[source][target]['weight'] = weight.
確定! 回上一頁