Python Fundamentals – Data Structure

This note will understand various sequential and non-sequential data types—the major difference between these data types and when, where, and how to use them. The selection of the correct data types is crucial for designing and implementing data science learning modules.

These data types allow us to store multiple values in an organized and efficient fashion. There are several sequential and non-sequential data types in python, and these are as follows:

 Sequential data types

  • Unicode Strings – Sequence of characters “(or)’.
  • Lists – Sequence of compound data ().
  • Tuples – Sequence of multi-data type objects [].
  • Arrays – Sequence of the constrained list of objects (all objects of the same data type) using array module from array package.
  • Range – Used for looping – using build-in range().

These data types offer unique functionalities for the variables to contain and handle more than one data type at a time. Supports such as indexing, slicing, concatenation, multiplication, etc.

Non-sequential data types

  • Dictionary – Sequence of key-value pairs {}.
  • Sets – Sequence of an unordered collection of unique data.

 95 total views,  1 views today

Scroll to Top
Scroll to Top