If you are using Python 3.x then the following these steps :-
- 1. Import csv module.
- 2. Open the file
- 3. Read the file.
- 4. Convert it into list
- 5.Print the list
import csv
with open('records.csv', 'r') as f:
file = csv.reader(f)
my_list = list(file)
print(my_list)
Hope this is helpful!
To know more join Master in Python programming course today.
Thanks!