Answers for "repeat iterator"

0

repeat iterator

# Python code to demonstrate the working of  
# repeat() 
     
# importing "itertools" for iterator operations 
import itertools 
     
# using repeat() to repeatedly print number 
print ("Printing the numbers repeatedly : ") 
print (list(itertools.repeat(25, 4)))
Posted by: Guest on August-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language