[Home]Bubble sort/Talk

HomePage | Bubble sort | Recent Changes | Preferences

Is the Python implementation correct? Does the variable i run from 1 to length or from length to 1? --AxelBoldt

Python range(n) gives a list [0, 1, 2, ... n-1]. The Python for statement then iterates over these values. Python arrays are indexed from 0 upwards. -- The Anome


HomePage | Bubble sort | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited December 14, 2001 5:01 pm by 213.253.39.xxx (diff)
Search: