DevOps(Day-14) : Python Data Types and Data Structures for DevOps
TABLE OF CONTENTS
In my yesterday's blog, we had a brief introduction to the datatypes in Python. If you want to follow my yesterday's blog-
https://biswaraj333.hashnode.dev/devopsday-13-introducing-python
Today, Let's summarize the points with some hands-on tasks.
Data Types
Data types are the grouping or categorizing of values that are passed to a program or code for executing and providing desired output.
Python has the following data types built-in by default: Numeric(Integer, complex, float), Sequential(string, lists, tuples), Boolean, Set, and Dictionaries.
To check the data type of any value passed to a variable you can use the below command.
\>>type(variable)
Data Structures
Data structures are an improvised way of organizing data that can be accessed efficiently to handle any situation.
It consists of following types:-
Lists.
Tuples.
Dictionary.
Let's see the difference between the above data structures in the tasks below.
Tasks
Give the Difference between List, Tuple and Set. Do Handson and put screenshots as per your understanding.
Create the below Dictionary and use Dictionary methods to print your favourite tool just by using the keys of the Dictionary.
-
Answer is as below:-
Create a List of cloud service providers eg.
Thanks for reading my article.
Have a nice day.
WRITTEN BY Biswaraj Sahoo --AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes
Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333
Subscribe to my newsletter
Read articles from Biswaraj Sahoo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Biswaraj Sahoo
Biswaraj Sahoo
--AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes Empowering communities via open source and education.