Day 14 Task: Python Data Types and Data Structures for DevOps
Sayali Shewale
DevOps Engineer | AWS cloud Engineer | AWS DevOps | Linux | Docker | Jenkins | Terraform | Kubernetes | Ansible | Grafana
Data Types
Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data.
Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes.
Python has the following data types built-in by default: Numeric(Integer, complex, float), Sequential(string, lists, tuples), Boolean, Set, Dictionaries, etc
To check what is the data type of the variable used, we can simply write:?your_variable=100?type(your_variable)
Data Structures
Data Structures are a way of organizing data so that it can be accessed more efficiently depending upon the situation. Data Structures are fundamentals of any programming language around which a program is built. Python helps to learn the fundamental of these data structures in a simpler way as compared to other programming languages.
Tasks
1.Give the Difference between List, Tuple and set. Do Hands-on and put screenshots as per your understanding.
List:
领英推荐
Tuple:
Set:
2.Create below Dictionary and use Dictionary methods to print your favourite tool just by using the keys of the Dictionary.
3. Create a List of cloud service providers eg.
cloud_providers = ["AWS","GCP","Azure"]
Write a program to add?Digital Ocean?to the list of cloud_providers and sort the list in alphabetical order.
Thank you for reading!