Slide 1

Published on Slideshow
Static slideshow
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Scene 1 (0s)

Kendriya V idyalay a J hagrakhand. ART INTEGRATED LEARNING.

Scene 2 (16s)

How to Visit Great Rann of Kutch: Essential Travel Guide.

Scene 3 (29s)

. Gujarat Solar Energy Policy. I would like to express my special thanks of gratitude to my teacher P ooja Gupta mam who gave us the golden opportunity to do this wonderful project on the topic”LIST MANIPULATION” under Art Integrated Learning, which also helped me in doing a lot of Research and i came to know about so many new things I am really thankful to them. Secondly i would also like to thank my parents and friends who helped me a lot in finalizing this project within the limited time frame..

Scene 4 (54s)

This is to certify that Bhoomika Bothra of class 11 has successfully completed the project work on the topic “LIST MANIPULATION" under ART INTEGRATED LEARNING , as prescribed byPooja gupta Mam , teacher for Cs for class X of the Central Board of Secondary Education in the year 2021-2022. It is further certified that this project is the individual work of the candidate. Signature: date :.

Scene 5 (1m 15s)

The python lists are containers that are used to store a list of values of any type. Unlike other variables python lists are mutable i.e., you can change the elements of a list in place; python will not create a fresh list when you make changes to an element of a list . Definition of List A list a type of a python collection that can store and manipulate similar as well as different types data values ..

Scene 6 (1m 42s)

Creating a list in python To create a list square brackets are used. It can be represented in the following forms: Empty List: [] –> Empty lists can be created when you need add values later or size is not fixed List of numeric values: [11,22,33,44,55] –> This list contains numbers as elements. List of mixed numbers: [11,22.22,33.33,44] –> This list is a collection of integers and float numbers. List of letters: [‘ x’,’y’,’z ’] –> This list is collection of letters or alphabets List of words: [‘Hello’,’How’,’are’,’you’] –> This list is collection few words List of mix different data types: [‘00001′,’Sagar’,10001,’12/12/2005′] –> This list is collection of a student record with different data values in the next section of Creating list in python class-11, we are going to discuss creating an empty list..

Scene 7 (2m 24s)

Accessing lists:- * length: function len (L) returns the number of items (count) in the list L. indexing and slicing: L[ i ] returns the item at index i (the first item has index 0), and L[i:j] returns a new list, containing the objects at indexes between i and j (excluding index j). membership operators both ‘in’ and ‘not in’ operator work on lists just like they work for other sequences. that is, in tells if an element is present in list or not, and not in does the opposite. concatenation and replication operator + and * :- the + operator adds one list to the end of another. The * operator repeats a list..

Scene 8 (2m 53s)

Creating a list in python – An Empty List To create an empty list declare one list and initialize with square brackets without any value. l = [] In the above statement, I have created an empty list named l. Now, whenever I want to access elements from this list I will use l and then manipulate the list with different expressions . Creating lists with multiple values To create lists with multiple values initialize your list with values you want to put in the list. l = [22,33.33,45,’17/08/2001′,’Hetal’,’Parmar’] The list values can be accessed by its index . Creating nested list A list can be an element of another list. This type of list is known as a nested list. l = [1,’Manish’,[56,67,89]].

Scene 9 (3m 26s)

Difference from strings:- although lists are similar to strings in many ways, yet there is an important difference in mutability of the two. Strings are not mutable, while list are. You cannot change individual elements of a string place, but lists allow you to do so. That is, following statement is fully valid for lists(though not for strings): >>>vowels[0]=’A’ >>>vowels [‘ A’,’e’,’i’,’o’,’u ’].

Scene 10 (3m 55s)

List operations:- (1) joining lists >>>lst1=[1,3,5] >>>lst2=[6,7,8] >>>lst1 + lst2 (2)Repeating or Replicating:- >>>lst1*3 [1,3,5,1,3,5,1,3,5] (3)Slicing the lists seq =L[ start:stop ] consider the following example: >>> lst =[10,12,14,20,22,24,30,32,34 ].

Scene 11 (4m 15s)

>>> seq = lst [3:-3] >>> seq [20,22,24] seq =L[ start:stop:step ] >>> lst [10,12,14,20,22,24,30,32,34] >>> lst [0,10:2] [10,14,22,30,34] >>> lst [::3] [10,20,30] >>>L1=[1,2,3] L1[10:20]=” abcd ” >>>L1 [1,2,3,’a’,’b’,’c’,’d’].

Scene 12 (4m 38s)

The len () function() This function returns the length of the list. The length of the list is equal to the number of elements present in the list. It is a standard library function. Syntax: len ( list_object ) Have a look at the following code: >>> l = [' Mon','Tue','Wed','Thurs','Fri','Sat '] >>> print( len (l)).

Scene 13 (5m 5s)

The index() method() This method returns the matched index of element from the list. Syntax: < list_obj >.index(<element>) Observe this code: >>> l=[11,22,27,34,67,98] >>> l.index (27).

Scene 14 (5m 30s)

The insert() method As you learn how to add or insert elements into the list at the end using append() method and extend() method. In this section we will see one more method to insert() element at desired location. Syntax: < list_obj >.insert(< idx >,<element>) The insert() method takes two parameters: idx – Index position of the element Element – Value of needs to be insert Observe the following code: l=[' Jan','Mar','Apr '] l.insert (1,'Feb') print(l) The output will be: [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’] It can also takes a negative index to be inserted.

Scene 15 (5m 58s)

The extend() method The extend() method add multiple values into the list. Syntax: < list_obj >.extend(<element>) Observe the following code: l=[] l.extend ([11,22,33,44]) print(l).

Scene 16 (6m 23s)

The remove() method The remove method is used to remove the elements by its value. If you are not aware about the index of the element and you know the value, you can use remove method. Syntax: < list_obj >.remove(< element_value >) Observe this code: l=[' Jan','Feb','Mar','Apr '] l.remove ('Feb') print(l.

Scene 17 (6m 56s)

The count() method It will count the presence of element passed as an argument from the list. If the element is not available in the list, it will return zero. Syntax: < list_obj >.count(element) Let us have look at the following code: l=[' Jan','Feb','Mar','Apr','Jan '] l2=l*2 print(l2.count('Jan')).

Scene 18 (7m 26s)

The sort() method It sorts the elements in ascending or descending order. The default order is ascending order. Syntax: < list_obj >.sort([reverse=False/True]) The code: l=[' Jan','Feb','Mar','Apr '] l.sort () print(l).

Scene 19 (7m 48s)

D eclaration. This project is being prepared by me independently.

Scene 20 (7m 59s)

B IBLOGRAPHY. http://www.girnationalpark.in/ https://www.thrillophilia.com/ https://www.tripsavvy.com/ https://www.holidify.com/ https://www.tourism-of-india.com/ https://blog.drbharatdesai.com/ WWW.GOOGLE.COM.

Scene 21 (8m 19s)

THANK YOU.