
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
What are Standard Data Types in Python 3?
Standard data types of Python include numeric data types, sequence types and dictionary which is a collection of key-value pairs.
Objects of numeric data types are either integers, floats or complex numbers. Integers are whole numbers, whereas floats have a fractional part. Complex number has two components, real and imaginary part. A float number multiplied by j which is an imaginary value equalling square root of -1 forms the imaginary part of complex number.
Python sequences include strings, lists and tuples. String is a sequence of any characters put in single, double or triple quotes. List is an ordered collection of items enclosed in square brackets. Tuple is also an ordered but immutable sequence of items enclosed in parentheses.
Dictionary is an unordered collection of key and value pairs. Key can be of any immutable type such as number, string or tuple and must not repeat in a dictionary object.
10, -10 -> integers 1.55, 0.005 -> float 2+3j, 5.6-1.5j ->complex ‘hello’, “how are you” ->string [1,2,3,4] -> list (1,2,3,4) ->tuple {‘a’:1, ‘b’:2, ‘c’:3} ->dictionary
- Related Articles
- Standard Data Types in Python
- What are compound data types and data structures in Python?
- What are various Text data types in Python pandas?
- What are the common built-in data types in Python?
- Which data types are immutable in Python?
- What are the Standard Organizations for Data Communications?
- What are the Properties of Data Encryption Standard?
- What are the Weaknesses of Data Encryption Standard?
- What are primitive data types in Java?
- What are reference data types in Java?
- What are primitive data types in JavaScript?
- What are enumerated data types in C++?
- What are Complex Data types in JavaScript?
- What are pointer data types in C#?
- What are nullable data types in C#?
