Skip to content

fitrialfaqrina/Type-of-data-in-Python

Repository files navigation

Type-of-data-in-Python

About type of data in Python such as List, Slicing in the String, Tuple, Set, and Dictionary

List, Tuple, Set, and Dictionary are the data structures in python that are used to store and organize the data in an efficient manner.

Use Case

Objective Statement

  1. Get the insight about sequence, set, and mapping Python data types, and the use of slacing on string
  2. Get the insight about the different data types in Python
  3. Get examples of writing syntax for each data type in Python
  4. To get the insight about methods in python that can be used for each data type
  5. To get the insight which data types are mutable and immutable

Challenges

  1. Python is a case sensitive programming language, so the writing of the syntax must be considered
  2. Difficulty in distinguishing mutable and immutable data types
  3. Differences in the use of parentheses in the syntax of each data type

Expected Outcome

  1. Knowing more about the data types of List, Tuple, Dictionary, and Set, as well as the use of slicing on string
  2. Knowing how to create sequence, set, and dictionary data types
  3. Understanding immutable and immutable data types
  4. Knowing how to write the correct syntax for each data type

Benefits

  1. As a basic material for learning Python language for beginners
  2. As additional knowledge about various data types in python
  3. To get more insight to better know the differences in data types in the Python programming language with other programming languages

Content

In addition to the number, string, and boolean data types, in python there are also sequence, set, and mapping data types. Sequence Types

List

  1. List is an ordered sequence of items
  2. List is mutable sequences
  3. Created by placing elements inside square brackets [ ] and separated by commas
  4. List can have any number of items and they may be of different types

Tuple

  1. Tuple is similar to list, but tuple is immutable sequences
  2. Tuple generally used for data that is one-time write and can be executed quickly
  3. Created by placing all the items (elements) inside parentheses ( ) and separated by commas
  4. Tuple can have any number of items and they may be of different types

Set Types

  1. Set is an unordered collection of items
  2. Set is used to store multiple items in a single variable
  3. Every set element is unique and immutable
  4. Can be used to perform mathematical set operations like union, intersection, symmetric difference
  5. Created by placing all the items (elements) inside curly braces { } separated by comma

Mapping Types (Dictionary)

  1. Python dictionary is an unordered collection of items
  2. Dictionary can be defined as a collection of data stored in key-value pairs
  3. Created by placing items inside curly braces { } and separated by commas. The key-value pairs are separated by a colon.
  4. The values can be of any data type and can repeat and the keys must be of immutable type

About

About type of data in Python such as List, Slicing in the String, Tuple, Set, and Dictionary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published