List Operations TRB CSI › Python Programming › list operations

List Operations

List Operations என்பது Python list-ல் உள்ள data-ஐ: access செய்வது add செய்வது change செய்வது delete செய்வது combine செய்வது repeat செய்வது search செய்வது sort செய்வது count செய்வது போன்ற செயல்களைச் செய்வதாகும். Simple definition: Operation…

Premium — locked Advanced 21 min 263 cards 56 programs 8 MCQs v4
This is a premium lesson. You can see the shape of every card — unlock to read them. Unlock

LIST OPERATIONS IN PYTHON…

Premium This card is part of the premium lesson. Unlock
Definition

List Operations என்பது Python list-ல் உள்ள data-ஐ: access செய்வது add செய்வது change செய்வது delete செய்வது c……

Premium This card is part of the premium lesson. Unlock
Simple Explanation

ஒரு shelf-ல் books வைத்திருக்கிறோம் என்று நினைத்துக்கொள்ளுங்கள். books = ["Python", "C", "Java"] இந்த list-ல்……

Premium This card is part of the premium lesson. Unlock
Flow

Python List Operations-ஐ முக்கியமாக இப்படி பிரிக்கலாம்: List Operations | |-- Access | |-- Update | |-- Add |……

Premium This card is part of the premium lesson. Unlock
Flow

1. ACCESSING LIST ELEMENTS…

Premium This card is part of the premium lesson. Unlock
Flow

ஒரு list-ல் உள்ள element-ஐ in……

Premium This card is part of the premium lesson. Unlock
Explanation

list_name[index] a = [10, 20,……

Premium This card is part of the premium lesson. Unlock
Explanation

a[0] 0 index-ல் 10 உள்ளது. a[2] 2 index-ல் 30 உள்ளது. INDEX POSITION a = [10, 20, 30, 40] Positive Index Valu……

Premium This card is part of the premium lesson. Unlock
Important

-1 -> last element -2 -> seco……

Premium This card is part of the premium lesson. Unlock
Important

1. MODIFYING / UPDATING LIST…

Premium This card is part of the premium lesson. Unlock
Important

Python List mutable. அதாவது l……

Premium This card is part of the premium lesson. Unlock
Explanation

list[index] = new_value a = [……

Premium This card is part of the premium lesson. Unlock
Explanation

list.append(value) a = [10, 2……

Premium This card is part of the premium lesson. Unlock

Flow: [10,20,30] | append(40)……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. append() WITH ANOTHER LIST…

Premium This card is part of the premium lesson. Unlock

இதில் ஒரு முக்கிய concept உள்……

Premium This card is part of the premium lesson. Unlock

ஏன்? append() முழு [30,40] list-ஐ single element ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. extend() OPERATION…

Premium This card is part of the premium lesson. Unlock

extend() multiple elements-ஐ ……

Premium This card is part of the premium lesson. Unlock
Explanation

list.extend(iterable) a = [10……

Premium This card is part of the premium lesson. Unlock

மிக முக்கியமான TRB / Intervie……

Premium This card is part of the premium lesson. Unlock
Comparison

1. insert() OPERATION…

Premium This card is part of the premium lesson. Unlock
Comparison

Specific position-ல் புதிய el……

Premium This card is part of the premium lesson. Unlock
Explanation

list.insert(index, value) a =……

Premium This card is part of the premium lesson. Unlock

இங்கு: insert(1, 20) அதாவது:…

Premium This card is part of the premium lesson. Unlock

எப்போதும் end-ல் add செய்யும்.……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. remove() OPERATION…

Premium This card is part of the premium lesson. Unlock

remove() ஒரு value-ஐ வைத்து d……

Premium This card is part of the premium lesson. Unlock
Explanation

list.remove(value) a = [10, 2……

Premium This card is part of the premium lesson. Unlock

கவனிக்கவும்: remove(30) இங்கு……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. DUPLICATE VALUES WITH remo……

Premium This card is part of the premium lesson. Unlock

a = [10, 20, 20, 30] a.remove……

Premium This card is part of the premium lesson. Unlock

remove() duplicate இருந்தால் ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. pop() OPERATION…

Premium This card is part of the premium lesson. Unlock

pop() index அடிப்படையில் element r……

Premium This card is part of the premium lesson. Unlock
Explanation

list.pop(index) a = [10, 20, ……

Premium This card is part of the premium lesson. Unlock

இங்கு: pop(1) index 1 உள்ள 20……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. pop() WITHOUT INDEX…

Premium This card is part of the premium lesson. Unlock

a = [10, 20, 30] a.pop()…

Premium This card is part of the premium lesson. Unlock

pop() index கொடுக்காமல் பயன்படுத்தினால்: Last ……

Premium This card is part of the premium lesson. Unlock

Memory: remove -> value pop -……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. del OPERATION…

Premium This card is part of the premium lesson. Unlock

del என்பது method அல்ல. இது Python ……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30, 40] del a[1]…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. DELETE MULTIPLE ELEMENTS U……

Premium This card is part of the premium lesson. Unlock

a = [10, 20, 30, 40, 50] del ……

Premium This card is part of the premium lesson. Unlock

1:4 என்றால் index: 1, 2, 3 de……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. clear() OPERATION…

Premium This card is part of the premium lesson. Unlock

List உள்ள எல்லா elements-ஐ re……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30] a.clear()…

Premium This card is part of the premium lesson. Unlock
Output
Result

List variable இன்னும் இருக்கும்.……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LIST CONCATENATION…

Premium This card is part of the premium lesson. Unlock

இரண்டு lists-ஐ combine செய்ய ……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20] b = [30, 40]…

Premium This card is part of the premium lesson. Unlock

இதனை: List Concatenation என்ற……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LIST REPETITION…

Premium This card is part of the premium lesson. Unlock
List

- operator மூலம் list-ஐ repea……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [1, 2]…

Premium This card is part of the premium lesson. Unlock

இதனை: List Repetition என்று அ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. MEMBERSHIP OPERATOR - in…

Premium This card is part of the premium lesson. Unlock

ஒரு value list-ல் இருக்கிறதா ……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30]…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. not in OPERATOR…

Premium This card is part of the premium lesson. Unlock

Value list-ல் இல்லையா என்று c……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30]…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. len() OPERATION…

Premium This card is part of the premium lesson. Unlock

List-ல் எத்தனை elements உள்ளன……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30, 40]…

Premium This card is part of the premium lesson. Unlock
Important

len() என்பது function. இது li……

Premium This card is part of the premium lesson. Unlock
Important

1. count() METHOD…

Premium This card is part of the premium lesson. Unlock
Important

ஒரு குறிப்பிட்ட value list-ல்……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 20, 20, 30]…

Premium This card is part of the premium lesson. Unlock

எல்லா elements count. a.count……

Premium This card is part of the premium lesson. Unlock

20 மட்டும் count.…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. index() METHOD…

Premium This card is part of the premium lesson. Unlock

ஒரு value எந்த index position……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30, 40]…

Premium This card is part of the premium lesson. Unlock

ஏனெனில்: 10 -> 0 20 -> 1 30 -> 2 ……

Premium This card is part of the premium lesson. Unlock

index() first occurrence-ன் i……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. max() OPERATION…

Premium This card is part of the premium lesson. Unlock

List-ல் largest value: max()…

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 80, 30, 50]…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. min() OPERATION…

Premium This card is part of the premium lesson. Unlock

Smallest value: a = [10, 80, ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. sum() OPERATION…

Premium This card is part of the premium lesson. Unlock

Numeric list-ன் total: a = [1……

Premium This card is part of the premium lesson. Unlock

Calculation: 10 + 20 + 30 = 60…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. sort() METHOD…

Premium This card is part of the premium lesson. Unlock

List elements-ஐ ascending ord……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [40, 10, 30, 20] a.sort()…

Premium This card is part of the premium lesson. Unlock

Default: Ascending order…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. DESCENDING ORDER…

Premium This card is part of the premium lesson. Unlock

a = [40, 10, 30, 20] a.sort(r……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. sorted() FUNCTION…

Premium This card is part of the premium lesson. Unlock

sort() மற்றும் sorted() இரண்ட……

Premium This card is part of the premium lesson. Unlock

sorted() original list-ஐ chan……

Premium This card is part of the premium lesson. Unlock

Important MCQ: a = [3, 1, 2]…

Premium This card is part of the premium lesson. Unlock

ஏனெனில் sort() new list retur……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. reverse() METHOD…

Premium This card is part of the premium lesson. Unlock

List-ன் current order-ஐ rever……

Premium This card is part of the premium lesson. Unlock
Explanation

a = [10, 20, 30, 40] a.revers……

Premium This card is part of the premium lesson. Unlock

கவனிக்கவும்: reverse() sorting செய……

Premium This card is part of the premium lesson. Unlock
Program
Example
Output
Result

இது descending sort அல்ல.…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LIST SLICING…

Premium This card is part of the premium lesson. Unlock

List-லிருந்து ஒரு range of el……

Premium This card is part of the premium lesson. Unlock
Explanation

list[start:stop] a = [10, 20,……

Premium This card is part of the premium lesson. Unlock

Important rule: start -> included stop……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LIST SLICING WITH STEP…

Premium This card is part of the premium lesson. Unlock
Explanation
Syntax

list[start:stop:step] a = [10……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. REVERSE LIST USING SLICING…

Premium This card is part of the premium lesson. Unlock

a = [10, 20, 30, 40]…

Premium This card is part of the premium lesson. Unlock

இதுவும் மிக முக்கியமான Python question. [::-1] m……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. COPYING A LIST…

Premium This card is part of the premium lesson. Unlock
Program
Simple assignment

இது actual independent copy அல்ல……

Premium This card is part of the premium lesson. Unlock
Program
Example
Explanation

b.append(40)…

Premium This card is part of the premium lesson. Unlock

b change செய்தாலும் a change ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. copy() METHOD…

Premium This card is part of the premium lesson. Unlock

Independent shallow copy உருவ……

Premium This card is part of the premium lesson. Unlock

இதில் outer list independent.…

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LIST COMPARISON…

Premium This card is part of the premium lesson. Unlock

Lists-ஐ == மூலம் compare செய்……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. ORDER MATTERS…

Premium This card is part of the premium lesson. Unlock

a = [10, 20] b = [20, 10]…

Premium This card is part of the premium lesson. Unlock

ஏனெனில் Python List ordered c……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. LOOP THROUGH LIST…

Premium This card is part of the premium lesson. Unlock

List elements ஒன்றன் பின் ஒன்……

Premium This card is part of the premium lesson. Unlock

இங்கு: i முதலில் 10, பின்னர் ……

Premium This card is part of the premium lesson. Unlock
Algorithm

1. USING range() WITH LIST…

Premium This card is part of the premium lesson. Unlock

a = [10, 20, 30]…

Premium This card is part of the premium lesson. Unlock
Program
இங்கு
Program
அதனால்

gives: 0, 1, 2…

Premium This card is part of the premium lesson. Unlock
Comparison
IMPORTANT ADD OPERATIONS
Explanation
Example

a = [10, 20] append a.append(30) [10,20,30] extend a.ext……

Premium This card is part of the premium lesson. Unlock
Important

Python List பற்றி கட்டாயம் நினைவில் வைத்திருக்க வேண்டியவை: List is ordered. List is mutable. Duplicate values……

Premium This card is part of the premium lesson. Unlock
Common Mistake
Common error 1

Wrong: a = [10, 20] a.append(30, 40) Error வரும். ஏனெனில் app……

Premium This card is part of the premium lesson. Unlock
Common Mistake
Common error 2

a = [10, 20] a.remove(50) 50 ……

Premium This card is part of the premium lesson. Unlock
Common Mistake
Common error 3

a = [10, 20] a.pop(10) Index ……

Premium This card is part of the premium lesson. Unlock
Common Mistake
Common error 4

a = [3, 1, 2] print(a.sort())…

Premium This card is part of the premium lesson. Unlock

Beginners இதை: [1,2,3] என்று எதிர்பார்க்……

Premium This card is part of the premium lesson. Unlock
Memory Trick

A E I Append -> End one Extend -> Entire collection Insert -> Ind……

Premium This card is part of the premium lesson. Unlock
TRB Point
Question 1

a = [1, 2] a.append([3, 4]) pri……

Premium This card is part of the premium lesson. Unlock
TRB Point
Question 2

a = [1, 2] a.extend([3, 4]) p……

Premium This card is part of the premium lesson. Unlock
MCQ

Which operation removes and r……

Premium This card is part of the premium lesson. Unlock
Interview Point

What is the main difference between append() and extend()? append() argument-ஐ one element ஆக add செய்யும். e……

Premium This card is part of the premium lesson. Unlock
MCQ

Which operator combines two l……

Premium This card is part of the premium lesson. Unlock
MCQ

Which method adds an element ……

Premium This card is part of the premium lesson. Unlock
MCQ

What is the output? a = [1, 2……

Premium This card is part of the premium lesson. Unlock
MCQ

pop() without an argument rem……

Premium This card is part of the premium lesson. Unlock
MCQ

Which method removes all elem……

Premium This card is part of the premium lesson. Unlock
MCQ

Which function gives number o……

Premium This card is part of the premium lesson. Unlock
MCQ

List is:…

Premium This card is part of the premium lesson. Unlock
Practice

Predict the output: 1. a = [10, 20] a.append(30) print(a) 2. a = [10, 20] a.extend([30, 40]) print(a) 3. ……

Premium This card is part of the premium lesson. Unlock
Summary

Python List முக்கிய operations: Access list[index] Update list[index] = value Add append() extend() insert() ……

Premium This card is part of the premium lesson. Unlock
Explanation
Short description

List Operations என்பது Python list-ல் elements-ஐ access, add, modify, delete, search, sort, combine……

Premium This card is part of the premium lesson. Unlock
Text size
17px
Theme
Contents
Print / PDF
Program