Book Image

Sage Beginner's Guide

By : Craig Finch
1 (1)
Book Image

Sage Beginner's Guide

1 (1)
By: Craig Finch

Overview of this book

Table of Contents (17 chapters)
Sage Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

For loops


A Python for loop iterates over the items in a list. The for loop in Python is conceptually similar to the foreach loop in Perl, PHP, or Tcl, and the for loop in Ruby. The Python for loop can be used with a loop counter so that it works like the for loop in MATLAB or C, the Do loop in Mathematica, and the do loop in Fortran.