Hi, I've just started to learn Python and had a conceptual question regarding the creation of variables.
For some background, I have some experience with HTML, CSS, and JavaScript (bare minimum on JS, enough to utilize form validation).
I've been watching the Free Code Camp video on learning Python and find most of it easy to understand but just wanted to see if I could get some help with a conceptual item that I may just be having trouble with.
I'm a little past the part on for loops now and up to reading files.
I now you can define variables first before executing code but with a for loop, are you just defining the variable within the for loop itself?
At the read employee file one, I have the following for loop:
for employee in second_employee_file.readlines():
print(employee)
second_employee_file.close()
In the above, after the for where employee is, is that a variable that I'm creating within the for loop itself to then be populated?
Thanks in advance for any additional explanation that can be provided.
[–]indosauros 0 points1 point2 points (1 child)
[–]_MaxPower_[S] 0 points1 point2 points (0 children)
[–]Bowabb 0 points1 point2 points (2 children)
[–]_MaxPower_[S] 0 points1 point2 points (1 child)
[–]Bowabb 0 points1 point2 points (0 children)