Skip to main content

Data Types - 2 (Sequence Type)

 Hello Buddies😍

                You gained some knowledge in my previous blog😊. Please share and support my content. So let's start our topic Data Types. In this blog we cover about Sequence Data Type. Sequence general meaning is items or events follows a specific order is called sequence. Example of sequence is Calendar, Time, Queue, etc.., 


Sequence Data Types classified into 3 types. 

1) String

2) List

3) Tuple

1) String :

             Collection of alphabets or any characters include numbers also is called string. So how can we identify a string?. There is way to identify the string is " " or ' ' (Quotes). if anything inside of this quotes is consider as string. 

String are not changeable once they are created. They are the on of the built in data type we all know.



 2) List : 

                 List is the data structure in python. List are used to store data. For example if we went any super market or buying any product on online we use cart to store our favorite  items. Here List also same. 

List are mutable( we can access them ), they contain index numbers, and they some built in functions to access the data. List are denoted by [ ]. Below functions are built in functions of List.

3) Tuples:- 
                Tuples are same like lists to use store data. But the difference is we can not changeable. It is indicated by ( ). Tuple are not changeable right what is the use of these tuple?. It is used to store our passwords once we create our password we can't change. These types situations we use tuples.
 
            Good to use storing our password. Some times we change our passwords so that time we access them and change right how it's possible?. Whenever we need to change data just convert Tuple to List. After conversion we can access the Tuple data.


Hope You Like This Explanation. Any Mistakes Are in My Blog Please Write A Comment.

Comments

Popular posts from this blog

Data Types - 1 (Numeric, & Boolean)

 Hello Buddies 😍                                    Data Types is an important concept in any programming language. Our daily life is connected with data. I will tell you a examples  1) Pics, Video & Documents 2) Stock Market  3) Students Marks Report etc.,  Now let's start our topic data types. In python data is classified into these types. 1) Numeric Type:-             INTEGERS :-      + ∞ to -  ∞ between these numbers are called integers           COMPLEX NUMBER      Complex number is a containing of imaginary values is called Complex Number.           Float Numbers    Decimal numbers are called Float Numbers. Ex: - 2.6,0.3 etc.., BOOLEAN TYPE In this data type we have only two values. They are True or False I will explain remaining...

Python Coding Interview Questions Part 7 video explanation

 Hello Buddies,                     This blog is about python interview questions How to solve with step by step process i will explain. So please read it carefully try to understand coding logic. let's start. Question : Write a code to sum of squares of n natural numbers?                         Before dive in to the code explanation 1st look at what is natural number and what is sum of square n natural number. Natural number is positive integers they start from +1 to +infinity. and it denoted by N = {1,2,3,4,.........}. Sum of squares of n natural numbers are 1^2 +2^2+3^2......... So we need to find sum of n natural number like ex : if we take 4 we need to do 1^2+2^2+3^2+4^2 = 30. So this is sum of squares of n natural numbers. Let's look at code part Code :  First take n input and sm = 0 it store sum value. and for i in range we all know it chec...

Why We Need To Learn Programming?

 Hello!😃 Buddies How Are You. 😍          I will tell you a million-dollar answer to why we need to learn any programming language. Before starting our answer, we must know what is programming language right. Programming is used to interact with our machines, we humans have different languages based on different locations right. Let's assume a situation you and your friend went to China you don't know Chinese but your friend know Chinese very well So he will help to explain everything right. Humans have different languages like that machines have their own language is called Binary language. Is written in 0's and 1's.          I will explain with an example, take a simple word like Hello so here if we want write Hello we need alphabets and we need to arrange a format right. It is easy and we can read that word. now we translate our Hello word into Binary language. After converting it will look like this " 010000010101100011000...