Is using for loop faster for the computer than repeated instructions?

154 Views Asked by At

What I mean is which would be faster for a computer to execute.

The following code is in python3.

for in range(10):
    print('billy bob')

OR

print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')
print('billy bob')

if you don't understand what I mean, just say in comments, ill try to answer.

0

There are 0 best solutions below