PythonDSA: Data types
Manish Negi
Aspiring DevOps Engineer | AWS | Linux | Bash Scripting | Docker | Git | Kubernetes | Jenkins
**What is Python?**
- Python is Open source, general purpose, high-level, and object-oriented programming language.
- It was created by **Guido van Rossum**
- Python consists of vast libraries and various frameworks like Django, Tensorflow, Flask, Pandas, Keras etc.
**How to Install Python?**
You can install Python in your System whether it is Windows, MacOS, ubuntu, centos etc. Below are the links for the installation:
- [Windows Installation](https://www.python.org/downloads/)
- Ubuntu: apt-get install python3.6 ?
Task1:
1. Install Python in your respective OS, and check the version.
2. Read about different Data Types in Python.
There are two types of Data Structures in python:
-Primitive Data structure: It is called primitive as they are building blocks for data manipulation and can hold only one type of data.
-Non-primitive data structure: Non-primitive data structure is a type of data structure that can store data of more than one type.
领英推荐
Primitve data structure consists of the following data types:
?* Integer: whole number[int] Integers represent numeric data – they represent whole numbers from negative infinity to infinity.
?* String: a collection of the alphabet[str] Strings are used to store data that involves characters (e.g., names or addresses). Strings can be created in Python by enclosing a sequence of characters within a pair of single or double quotes.
?* Boolean: conditional [True/False] Boolean type only has two types of return values: True and False. These return values are interchangeable with the integers 1 and 0.
?* Float: floating point [float] Floating points are used for rational numbers that usually end with a decimal figure.
Non-primitive data structure consists of the following data types:
* List: Python Lists are used to store collections of heterogeneous items; they can be recognized by their square brackets which hold elements and are separated by a comma.
* Dictionaries: A dictionary is an unordered, changeable, and indexed collection of elements. In Python, dictionaries are written with curly brackets and contain keys and values. See the code below:
Helping Students and Professionals build their Careers | Experience in DevOps | Python | AWS | PySpark | SQL | NoSQL | 1000+ Learners placed
2 年python after a long time.. thanks for sharing Manish Negi