Back

Loops in Python Programming

Created 1 year ago
68 Views
1 Comments
Svik42X
@Svik42X
Svik42X
@Svik42XProfile is locked. Login

Hi there, I have a query related to loops.

I want to know more about loops and how it works.

In for loop we write:

number= [1,4,2,6]

for x in number:

print(x)

Output will be:

1

4

2

6

Can I know the reason that why all numbers are written in different lines not in one line like 1,4,2,6?

Comments
Please login to comment.