Python Code Examples – Sample Script Coding Tutorial for ...
www.freecodecamp.org › news › python-code-examplesApr 27, 2021 · Code: >>> my_list = ["a", "b", "c", "d"] >>> for i in range(2, len(my_list)-1): my_list[i] *= i. Now the list is: ['a', 'b', 'cc', 'd'] These are some examples with three parameters: >>> for i in range(3, 16, 2): print(i) Output: 3 5 7 9 11 13 15. Code: >>> for j in range(10, 5, -1): print(j) Output: 10 9 8 7 6. Code: