Assuming you mean frontend web development.
It depends on the type of project, but I'd recommend following a REST server-client architecture whenever possible, which makes separating the client from the data logic easier.
With that in mind, then the difference depends on the type of application:
Sometimes, the type of application allows for enough logic to live on the REST API to make the decision one of what templates to use JS or Python.