YourLoss 01
YourLoss 01

Reputation: 21

how to prevent print() from repeating every alternate line?

when i run this:

arr=[[2,3,4],[3,4,2]]

for i in arr:
    print(*i)
    print{'-----')

my output is this,

2 3 4
-----
4 5 6
-----

how do I get this output instead?:

2 3 4
4 5 6
-----

Upvotes: 1

Views: 117

Answers (2)

Crabby Fish
Crabby Fish

Reputation: 140

arr=[[2,3,4],[3,4,2]]

for i in arr:
    print(*i)

print('-----')

Upvotes: 2

Goggi
Goggi

Reputation: 42

arr=[[2,3,4],[3,4,2]]

for i in arr:
    print(*i)
print('-----')

Upvotes: 2

Related Questions