Hey guys! So, I am a new person to these forums, and I am learning python right now. Currently, I'm learning about for loops, but I'm not super sure on how exactly they work. Here's an example of some code from the course I'm taking:
What I'm unsure about is how exactly they got "item" in line 3. Can someone help me out and explain it a bit clearly for me please? Thanks!
list = [5, 2, 1, 4, 9, 10] min_value = 0 for item in list: if item < min_value: min_value = item print(min_value)
What I'm unsure about is how exactly they got "item" in line 3. Can someone help me out and explain it a bit clearly for me please? Thanks!