# Free Class 11 Python List Questions for Practice

Share with others

# Python List Questions for Practice

## ASSIGNMENT SET – 1

Time: 30 min                                                                                   M.M. – 20

Q1. What do you mean by List in Python?                                            

Q2. Write the output of the following code:                                         

>>> A = [ ]

>>> A

>>> print(A)

Q3. What do you mean by Nested list? Give example                          

Q4. Which method is used to create an empty List?                    

Q5. Negative indexing start from right side of the List(T/F)                

Q6. Write the code to convert the following string into List.              

“csiplearninghub”

Q7. Write a program to accept 10 numbers from the user and             

add even numbers in a list named “evenlist” and odd

numbers in a list named “oddlist”

Q8. Write a function evensum(list) in python that takes list of 10      

numbers as argument and display the sum of all even

numbers in the list.

Q9. What is the difference between slicing and indexing of list?        

Q10. Write the output of the following code:                                       

L = [[1,2],[3,4],[5,6]]

print(L)

print(L[-1])

Q11. Write the output of the following code:                                       

[1,3,7,9] < [3,5,4]

[‘A’,’b’,’c’] > [‘z’]

Q12. Write the output of the following code:                                       

S = “csiplearninghub”

L = list(S)

1. print(L[-1:-5])
2. print(L[::-1])
3. print(L[1:8:2])
4. print(L[2:5])

# Python List Questions for Practice

## ASSIGNMENT SET – 2

Time: 30 min                                                                                   M.M. – 20

Q1. What do you mean by traversing of list in Python?                       

Ans. Traversing means to access each elements of list. This can be done with the help of the loop.

Q2. Write the output of the following code:                                         

A = [1, 2, 3, 4, 5]

print (A[2:6])

Ans. [3, 4, 5]

Q3. Elements of list are enclosed in ________ brackets                      

Ans. Square([ ])

Q4. Write an example of nested list.                                                       

Ans. A = [1, 2, 3, [4, 5]]

Q5. Write the output of the following: (if input string is = INDIA)  

A = list(input(“Enter the String”))

print(A)

Ans. [‘I’,’N’,’D’,’I’,’A’]

Q6. Which method is used to remove last element of element in list?         

Ans. pop( )

Q7. Write a program to add only multiples of 3 from the given list.    

A = [12, 3, 4, 56, 7, 9, 49, 34, 6]

Ans.

A = [12, 3, 4, 56, 7, 9, 49, 34, 6]

s=0

for i in A:

if i%3==0:

s=s+i

print(“Sum of all multiples of 3 is “,s)

Q8. Write a function Lavg(list) in python that takes list as argument and display the average of all 

numbers in the list.

Ans.

A = []

def Lavg(A):

s=0

av=0

for i in A:

s=s+i

av=s/len(A)

print(“Average is “,av)

Lavg([1,2,3,4,5,6,7,8,9,10]) #Only to verify the result

Q9. Write a function double(list) which takes list as argument and multiply each and every 

element of list by 2?

Ans.

A = []

def double(A):

for i in range(len(A)):

A[i]=A[i]*2

print(“List is “,A)

double([1,2,3,4,5]) #Only to verify the result

Q10. Write the output of the following code:                                       

A = list(“Python List Questions”)

for i in range(len(A)-1,0,-5):

print(A[i])

Ans.

s

s

t

n

Q11. Write the output of the following code:                                      

a=[‘a’,’b’,’c’]

b=a

a=’A’

print(a)

print(b)

Ans.

[‘A’, ‘b’, ‘c’]

[‘A’, ‘b’, ‘c’]

Q12. Write the output of the following code:                                      

k = “Subscribe to my blog”

L = list(k)

1. print(L[-1:-7:-3])
2. print(L[:15:-1])
3. print(L[1:len(k):5])
4. print(L[2:-15])

## Click for More Python List Programs

Disclaimer : I tried to give you the correct answers of all the python list questions given above, but if you feel that there is/are mistakes in the python list questions given above, you can directly contact me at csiplearninghub@gmail.com. Also Share your feedback regarding these python list questions so that I can give better content to you.

## MCQ of Computer Science Chapter Wise

1. Functions in Python

2. Flow of Control (Loop and Conditional statement)

3. 140+ MCQ on Introduction to Python

4. 120 MCQ on String in Python

5. 100+ MCQ on List in Python

6. 50+ MCQ on Tuple in Python

7. 100+ MCQ on Flow of Control in Python

8. 60+ MCQ on Dictionary in Python

## 70 Practice Questions on if-else

Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series

Share with others
error: Content is protected !!