hi guys welcome back to video very sorry because of my personal reasons and you guys don't wor will it as soon as possible we'll do it don't worry so we have to think like that don't worry WhatsApp lcri okay the very first question we have in the module two is so the very first question will be the very most important topic in this particular model is list really important and it's very easy I'll teach you what is list and everything explain the methods of list dat type in Python for the following operations with suitable and we have to the lre I'm giving you an example follow this very simple language it is aist is a buil-in data type and second use it to store the collection of items list are one of the most versatile and commonly used data structures in Python [Music] simp so these elements can be any data types including numbers or even more complex object ex adding a value to the list you can add you can add values to a list using various meth one I'm talking about this don't wor these are my items 1 2 these are my items okay next insert method simple 1 2 so in the index first index second index my list insert 1A 4 one is the position that is nothing but the index and four is the value that I supposed to you know append add to the list that I have simple so what I'm doing is variable my list insert me I'm passing four to the value one and to the position one so 0 and and next we're looking into remove value from a list so you can remove values from a list using these methods remove simple remove list simple we are not putting Loop something that is why is reming only the two removes the first occurrence of the two simple next pop method very simple very simple pop method simp simple next okay next to finding a value in a list so to find a value in a list you can use in operator or the index so example if in print is in the list using index method using index method simple example okay example code copy copy uh Cod myex the statement if you know you know we'll be fetching it okay next sh ising or FSE 2 3 4 3 2 1 okay and you can also create a shorted copy of list without modifying the original using the short function simple next these methods and operations provide flexibility when working with the list in Python allowing you to add remove find chart values according to your next question what is a list and explain append insert index remove so they know python very well if you have written something correctly then they will definitely give you the marks and of course if you feel like you have not gotten the marks which you are expecting then you can put into revaluation simple next okay are okay questionability [Music] okay also list down the difference between list and tles and how list can be converted so sorry mity immutable so so you know are immutable and their contents cannot be modified once one of most okay so next list operations may be slightly slower due to mutability and operation can be faster because of immutability that is because so okay lists are used for collection of items where elements can be changed or need to be modified are used to collection of that should not change like P you can use Constructor it's very simple okay this creates a new tle with the same elements as the original list the resulting tle is immutable and its element cannot be changed simple Al next what is a string string explain any four method It's associated with a string and explain each of them with an example okay string and that is what I'm given here given here it's very simple in a python a string is a buil-in data type used to represent text characters or sequence of characters and strings are included in either single and quotation marks are widely used for manipulating and you know representing textual data we going to use this quotations and we going to use the string dat simple and here are four common string Methods along with the explanation simple first L converts all the character into upper case simple okay just just to give you an example just to give you an example text to Upper very sorry simple next replace method the replace method simple it will take two you know arguments one is one argument is the word which you're supposed to replace and second is the replacement word I thought which you supposed to you know see the result simple these are the four methods easy methods you can write it and remember it's very simple and it's very done next discuss the different ways of traversing a list and explain with example simple traversing a list means visiting each ment of the list to perform some operation to perform some operations simple such as printing modifying searching these are several ways to Travers in a list using python simple so what we are going to do is we'll take example um now actually different ways the very first method which will be coming to developers programing a very Brute Force method is using the follow you can use follow Loop to iterate through the elements of the list by one by one just simple my VAR 2 using Loop variable cre I'm very sorry I don't know why it is fluctuating like this one second okay Loop okay okay while index is less than length of my while IND IND equal index IND IND IND IND + 1 + 1 + 1+ 1 0 1 1 1 index equal index anything okay next using list comparison item star star two item star star two for item in my list item star star start to item in my list in this example a list Square list is created by squaring each [Music] okay very simple next using enumerate different type of function index value iner for index I comma value in enumerate enumerate function can be used to you know Traverse the list while keeping track of the index while keeping track of both index simple IND going you know you can access that using the flower brackets so index and then value you'll be getting the IND like Lo with in this example the range function generates indic you know generates index indices 1 2 3 1 2 and the loop ACC the list Elements by indexing simple okay last and most important question what is a dictionary in Python and how it is different from list datae and discuss the following method 1 2 3 4 IND first second cannot be empty can simple a dictionary in Python is a buil-in data type that is that represents an unordered collection of key value P it is also known as associative array or a hash map what ish associative AR you can easily tell them it is a dictionary in Python next dictionaries are used to store and retrieve databased on Keys rather than indes IND okay okay and key maps to specific value and you can use keys to access modify delete a value in the dictionary simple next difference between dictionary and list ordered collection of items accessed by indexes okay elements can be of any keys and values can be of [Music] any next elements are stored in no specific order sareet going to use the curly next for example to give you an example return exist doesn't so simple next it the items method returns a VI of all key value PS in the dictionary weave of key and value PS in dictionary as simple next Keys method Keys method the keys methods a v of all keys in the dictionary values returns all the of the values okay so next okay this video is helpful for you um and all the very best uh we'll be you know uploading the C videos uh till then keep keep on learning and happy learning