Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
26 lessons,
4h 31m
List Introduction (in Hindi)
479 plays

In this lesson I am going to teach basics of list .

Jitendra jangir from CSE branch ,having more than 4 years teaching experience ,my courses will help you to understand different programming languages

Unacademy user
thank you mam such an amazing course... crystal🔮 clear
:) thank you!
sir please make vedio on buuble sort and insertion sort please
  1. LiSt introduction List is a sequence of values -Values can be of any type. The values in the list are called elements or items or members It is an ordered set of values enclosed in square brackets1 -Values in the list can be modified i.e. it is mutable

  2. Creation of lists - Creating lists L if we write like L. It is known as empty list. Long lists If you have a long list to enter, you can split it across several lines, like below: L=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,32, 33, 34, 35]

  3. Indexing and accessing Indexing Forward Indexing Backward 1-4) color list Blue Black, Blue List Name

  4. Indexing and accessing As it is set of values, we can use index in square brackets [ 1 to identify a value belonging to it - for example: L=[45, 23, 56, , A, , , B, ]

  5. Input from user We Can use eval (input () to allow the user to enter a list L = eval (input ('Enter a list: ')) .print ( The first element is LT01) Output will be like : -Enter a list: [5, 7,9] -The first element is 5

  6. Method append (x) sort () count (x) index (x) reverse () remove (x) pop (p) insert (p, x) List methods Description adds x to the end of the list sorts the list returns the number of times x occurs in the list returns the location of the first occurrence of x reverses the list removes first occurrence of x from the list removes the item at index p and returns its value inserts x at index p of the list

  7. ThankS!