Computer Science, asked by anurag8510909, 8 months ago

can we use for loop without range function? In python​

Answers

Answered by senseofscience
0

Answer:

yes we can!!

Explanation:

we can use a for loop with a list or string and can specify what we have to do with each item of a list or string

example:

list=["l","i","s","t"]      #create a list with desired items

for item in list:

   print(item)

#the above program creates a list and then we define a for loop to print each item of the list

I HOPE MY ANSWER HELPS

Similar questions