|
>>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> range(5, 10) [5, 6, 7, 8, 9] >>> range(0, 10, 3) [0, 3, 6, 9] >>> range(-10, -100, -30) [-10, -40, -70]
>>> a = ['Python', 'programlama', 'öğrenmek', 'çok', 'kolay !'] >>> for i in range(len(a)): ... print i, a[i] ... 0 Python 1 programlama 2 öğrenmek 3 çok 4 kolay
|