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

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,106 questions

40,778 answers

573 users

How to use for loop in Python

6 Answers

0 votes
for i in range(1, 10):
    print(i)

'''
run:
1
2
3
4
5
6
7
8
9

'''

 





answered Feb 25, 2016 by avibootz
0 votes
for i in range(1, 11):
    print(i)

'''
run:
1
2
3
4
5
6
7
8
9
10

'''

 





answered Feb 25, 2016 by avibootz
0 votes
for i in range(10, 21):
    print(i)

'''
run:
10
11
12
13
14
15
16
17
18
19
20

'''

 





answered Feb 25, 2016 by avibootz
0 votes
for i in range(0, 10):
    print(i)

'''
run:
0
1
2
3
4
5
6
7
8
9

'''

 





answered Feb 25, 2016 by avibootz
0 votes
for i in range(0, 10, 2):
    print(i)

'''
run:
0
2
4
6
8

'''

 





answered Feb 25, 2016 by avibootz
0 votes
programming_languages = ["C", "C++", "Python", "C#"]

for i in programming_languages:
    print(i)

'''
run:
C
C++
Python
C#

'''

 





answered Feb 25, 2016 by avibootz

Related questions

1 answer 49 views
3 answers 111 views
6 answers 127 views
127 views asked Apr 23, 2021 by avibootz
11 answers 287 views
287 views asked Jun 22, 2020 by avibootz
1 answer 96 views
...