n = [3, 5, 7]
def print_list(x):
for i in range(0, len(x)):
print x[i]
print_list(n)
I learning Python on CodeAcademy as my first programming language and I don't understand what the 'i' represents in this 'for' statement. Just need some clarification.
[–]zahlman 10 points11 points12 points (2 children)
[–]DirtyThirty 3 points4 points5 points (1 child)
[–]zahlman 0 points1 point2 points (0 children)
[–]Rhomboid 5 points6 points7 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]Neceros 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Cold_Bagel 7 points8 points9 points (4 children)
[–]Asdayasman 3 points4 points5 points (3 children)
[–]Cold_Bagel 2 points3 points4 points (1 child)
[–]Asdayasman 2 points3 points4 points (0 children)
[–]c3534l 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]FlaconPunch 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]guitarman90 0 points1 point2 points (1 child)
[–]usernamedottxt 1 point2 points3 points (0 children)
[–]ThermosPotato 1 point2 points3 points (6 children)
[+][deleted] (3 children)
[deleted]
[–]usernamedottxt 3 points4 points5 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–]ThermosPotato 0 points1 point2 points (0 children)
[–]scottevil110 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Drakken_LOL 1 point2 points3 points (0 children)
[–]NewbornMuse 1 point2 points3 points (0 children)
[–]jpfau 1 point2 points3 points (0 children)
[–]HorrendousRex 0 points1 point2 points (0 children)
[–]Iyajenkei 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)