Lesson details

Key learning points

  1. In this lesson, we will learn how to write to CSV files. We will work with 1D and 2D lists, before converting them to string and writing them to CSV files. There are lots of list challenges this lesson, which should help to enhance skills in preparation for the final project.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
True or False: A CSV File is a text file
False
Correct answer: True
Q2.
What string method can you use to remove unwanted pieces of data?
delete()
remove()
string()
Correct answer: strip()
Q3.
True or False: The split() method splits the string where it finds a space " " and returns it in a list.
False
Correct answer: True

3 Questions

Q1.
What does CSV stand for?
closed-separated values
closed-separated volumes
Correct answer: comma-separated values
comma-separated volumes
Q2.
What will be stored in the numbers.csv file when this program is executed?
An image in a quiz
"3, 4, 5"
Correct answer: 3, 4, 5
numbers
numbers.csv
Q3.
True or False: An integer can be written directly to a CSV file
Correct answer: False
True