Records data structure
Records data structure
Records are composite data types that contain references to at least 1 other datatype within them. The advantage of records is that all related data is tied together in one place. They are incredibly useful and popular in many languages.
#Works for Python 3.3+
import types
giraffe = types.SimpleNamespace()
giraffe.name = "Gerry"
giraffe.height = 350
giraffe.age = 15
giraffe.origin = "Africa"
What is a record in a data structure?
{"answers": {"A": "None of the above", "B": "A data structure that stores records in a hierarchical manner", "C": "A collection of related data items", "D": "A single data item that holds multiple values"}, "question_text": "What is a record in a data structure?", "correct_answer": "C"}
Introduction to Records data structure
- Records data structure
Topic Tests
Š learnlearn.uk 2025 |
[email protected] |
Privacy Policy.