problem description
I want to talk about a piece of code in d3.js converted to python, and then encountered a problem, that is, js can use functions like variables without passing parameter values. I don"t know how to implement the same function in my python.
here is the js code.
function defaultX$1(d) {
return d[0];
}
function defaultY$1(d) {
return d[1];
}