-4

In C++ or Java we can define indexes in loop like :

for(int i = 5 <---; i < array.size(); i++)
     for(j = i + 1 <---....)

I am newbie in Python and can we impelement the same as above in python?

Kema
  • 39
  • 7
  • This is a duplicate. Take a look here [https://stackoverflow.com/questions/4170656/for-loop-in-python](https://stackoverflow.com/questions/4170656/for-loop-in-python) – Carlo Zanocco Sep 05 '20 at 09:41

2 Answers2

1
for i in range(5, len(array)):
   for j in range(i+1, ...):
       rest of code
IoaTzimas
  • 10,538
  • 2
  • 13
  • 30
1
for i in range(5, len(array)):
    for j in range(i + 1, ...)):
        ...
Jiří Baum
  • 6,697
  • 2
  • 17
  • 17