Revise Computingrevisecomputing.co.uk
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates
At a glanceFeaturesStudentsPricingHow it worksFree GCSE notesExam dates

Knowledge organisers / Arrays and Records

Records

All topicsPractise exam questions
Knowledge organiser

Arrays and Records

301.17d

Group fields together.

What you need to know

A record groups related fields together. In Python, dictionaries serve as records — each field has a key and a value (e.g. student["name"]).

Key points

  • Dictionary: student = {"name": "Alice", "age": 15}
  • Access: student["name"] → "Alice"
  • Modify: student["age"] = 16
  • Each key must be unique
  • Can store a list of records for multiple entries

Code examples

Records with dictionaries
python
student = {
    "name": "Alice",
    "age": 15,
    "score": 87
}
print(student["name"])   # Alice
student["score"] = 92    # Update