Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,938 questions

51,875 answers

573 users

How to start for loop at N instead of 0 in Python

2 Answers

0 votes
for i in range(3, 7):
  print(i)



'''
run:

3
4
5
6

'''

 



answered Oct 23, 2019 by avibootz
0 votes
for i in range(3, 9):
  for j in range(i + 1, i + 3): 
      print("i = ", i , " j = ", j)
  print()



'''
run:

i =  3  j =  4
i =  3  j =  5

i =  4  j =  5
i =  4  j =  6

i =  5  j =  6
i =  5  j =  7

i =  6  j =  7
i =  6  j =  8

i =  7  j =  8
i =  7  j =  9

i =  8  j =  9
i =  8  j =  10

'''

 



answered Oct 23, 2019 by avibootz

Related questions

2 answers 135 views
1 answer 129 views
129 views asked Apr 23, 2021 by avibootz
1 answer 181 views
1 answer 153 views
...