I am reading this CSV file and adding its value to a list of a class. Can you kindly explain how is it possible to use the strip and split function like this?
ba = []
for line in cvsfile:
j = line.split(',')
num, f, s, b = [i.strip() for i in j]
name = A(num, f, s, b)
ba.append(name)
I am confused at this part.
j = line.split(',')
num, f, s, b = [i.strip() for i in j]
By the way, my class name is A.
Please explain. Thanks in advance. Sorry for the language as English is not my first.