Skip main navigation

Validating user input

Data validation is the process of checking that data coming into a program is valid and appropriate and can be dealt with by your program. Without data validation, programs may …

How to structure data in CSV files

Most of us have used a spreadsheet to record data. It is one of the most basic tools used for analysing financial and scientific data. But have you ever used …

JavaScript Object Notation

JavaScript Object Notation or JSON is much more than a structured method to store data. JSON is the language that helps projects interact over the internet. JSON is a lightweight …

Using CSV in Python

Comma-separated value files offer simple persistent structured storage. You can work with CSV files using standard Python file methods, but using the Python CSV library makes it easier to handle …

Structured and Unstructured Data

In this step, you will learn more about structured and unstructured data. What Is Data Structure and Why Is It So Important? Data with no structure is rather difficult to …

What is data persistence?

How might data be stored without computers? You may have an address book which stores the details of your friends and family, indexed by the first letter of their surname. …

Text files and binary files

Python can create files for humans to read and it can also create files intended for only the computer to read. In the previous steps you have been writing and …

Reading from a file

In the previous step you learnt how to write data to a file, but how can you read data from a file? Files can store lots of useful data. For …

Writing to a file

Storing data is important as it enables the user to retain information for future use. Data can be stored for many reasons. For example: Sensor data for analysis in a …

Exception handling

When you tried to open a file that didn’t exist, Python raised an error. In this step you will explore how to deal with errors as they occur. The try...except …