lundi 22 février 2021

JavaScript to Python - How would this JavaScript code be written in Python?

The code below works fine in JavaScript. I want to know how it would be written in Python.

Ps: b, basetAmt are defined variables and F ist a list; F = [1, 3, 1, 3, 1].

// increase b, redo everything.

    if (b == basketAmt -1 && F.filter(x => x == 1).length != 0)
        b = 0;

Aucun commentaire:

Enregistrer un commentaire