Thursday, January 18, 2018

Loops in Python



  • There are two types of loops in Python, for and while. 
  •  For loops iterate over a given sequence. 

Note: For loops can iterate over a sequence of numbers using the "range"
Here is an example:





No comments:

Post a Comment