# Day 14 : Python Data Types and Data Structures for DevOps

We will learn data types and data structures in Python on day 14. Let's start.

Python has four numeric data types: int, float, complex, and bool.

* int: Represents integers (whole numbers) such as 1, 2, 3, etc.
    
* float: Represents decimal numbers such as 1.0, 2.5, 3.14, etc.
    
* complex: Represents complex numbers such as 2+3j, 3-2j, etc.
    
* bool: Represents boolean values True and False.
    

Python has three sequence data types: list, tuple, and range.

Task 1 : Give the Difference between List, Tuple and set. Do Handson and put screenshots as per your understanding.

1. List:
    
    * A list is an ordered sequence of elements enclosed in square brackets \[\].
        
    * It is mutable, which means we can change the elements after creating a list.
        
    * List allows duplicates.
        
    * We can access the elements using indexing and slicing.
        
    * Lists are used when we want to store an ordered collection of items.
        

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475393396/c23a0d29-4aac-44cc-92b2-b68760afc717.png align="center")

1. Tuple:
    
    * A tuple is an ordered sequence of elements enclosed in parentheses ().
        
    * It is immutable, which means we cannot change the elements after creating a tuple.
        
    * Tuple allows duplicates.
        
    * We can access the elements using indexing and slicing.
        
    * Tuples are used when we want to store a collection of items that should not be changed.
        

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475499254/0fc54992-8a6e-4c70-8d00-0e5378104ac0.png align="center")

1. Set:
    
    * A set is an unordered collection of unique elements enclosed in curly braces {} or set().
        
    * It is mutable, which means we can add or remove elements after creating a set.
        
    * Set does not allow duplicates.
        
    * We cannot access the elements using indexing and slicing.
        
    * Sets are used when we want to perform mathematical operations like union, intersection, difference, etc. on collections of items.
        

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475536491/459515ad-1b6e-4922-96e7-548b4d489db0.png align="center")

Task 2 : Create below Dictionary and use Dictionary methods to print your favourite tool just by using the keys of the Dictionary.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475628212/87756130-246f-483c-aa45-2aa9a8e7656f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475658186/f084880b-aa51-43c5-98a1-6ace75be9f85.png align="center")

1. Create a List of cloud service providers and Write a program to add `Digital Ocean` to the list of cloud\_providers and sort the list in alphabetical order.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683475720369/570465ad-eff8-4e61-a0e1-8e21463421d3.png align="center")

That was all for Day 14 Challenge. It was easy. I hope I can clear your doubt by attaching screenshots. Looking forward to the next challenge.

happy coding
