CBSE COMPUTER SCIENCE
Открыть в Telegram
QUESTION BANK, REFERENCE BOOK, LAB MANUAL , WORKSHEET ETC., PYTHON TEXT BOOK AND REFERENCE BOOKS, 01. ASK QUESTIONS AT https://t.me/joinchat/FJ1noGs-64I0OWI1
Больше549
Подписчики
Нет данных24 часа
Нет данных7 дней
Нет данных30 день
Архив постов
Greetings from Vishvas Publications Pvt Ltd!
Vishvas Publications is organizing Live YouTube Mock Tests for Term 1,Computer Science(083) Class 12 by our author *Harpreet* *Malvai . We invite you and your students to participate in these interactive sessions where they can give the answers in the chat.
Do join the following link:-
https://www.youtube.com/channel/UC5Kjj87IFxmalnmt9O78TKg
Mock Test 1 on Channel dashboard - YouTube Studio on Friday, November 19 at 5pm
Mock Test 2 on Channel dashboard - YouTube Studio on Saturday, November 20, at 5pm
Thanks & Regards
Vishvas Publications Pvt Ltd
#List Methods
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.index(4)
print("Index of an element : ",A)
A.index(2)
print("Index of the element is not exist : ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.append(10)
print("After Appending : ",A)
A.append("Apple")
print("After Appending : ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.extend([10])
print("After Extending : ",A)
A.extend("Apple")
print("After Extending : ",A)
A.extend(["Mango","Orange"])
print("After Extending : ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.remove(2)
print("After Removing a value: ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.pop()
print("Deleting a value from top of a list: ",A)
A.pop(2)
print("Deleting a value by particular position: ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.clear()
print("Deleting all the elements in a list: ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
B=A.count(4)
print("Count the element 'x' in the list: ",B)
B=A.count(1)
print("Count the element 'x' in the list: ",B)
B=A.count(5)
print("Count the element 'x' in the list: ",B)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.sort()
print("Ascending order : ",A)
A.sort(reverse=True)
print("Descending order : ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
A.reverse()
print("Reversing : ",A)
A=[1,2,3,4,5,4]
print("Given List : ",A)
B=A
print("Copy a List : ",B)
import copy
B=copy.copy(A)
print("Copy a List using built-in function : ",B)
