mercredi 28 avril 2021

equivalent for loop in python for this loop which is written C++ [closed]

I am trying to write a for loop in python which is written in C++, while converting the loops of C++ to python I am facing diffculities.

for(int len = 1; len < n; len++){
    for(int i = 0; i + len < n; i++){
       // bla bla bla code
    }
}

How can i write the inner for loop in python ?? Any generalized approach which can work in every scenario ?? If the Question is duplicate one sorry for this I couldn't know what and how to search in google about this.

Can I please get some help in this problem from you. Thanks In Advance.

Aucun commentaire:

Enregistrer un commentaire