PROGRAMMING
GAME DEVELOPMENT
Loops are used to carry out an operation over and over again for a given number of times. As List can have any number of items hence it is very important to have some mechanism to pick each element of any list one by one and perform an operation on it. This is done using Loops. We will be using the for
and while
loop here.
Try changing the code as you like. Click the button, to Run the code again.
CODE SNIPPETS
;
to join two Executable Statements/
to break code into multiline codelen()
, find()
, replace()
& split()
zip
function to iterate over two Listsdel
, remove()
or pop()
insert()
, reverse()
& sort()
What is Studytonight?
Tutorials
Learn to Code
Interview Questions
/code/python/iterating-list-for-while-loop.php