Questions on Python List – Assignment -1

Python List is one of the most used data types in python so we need a lot of questions to practice our List skills in python. This Question set aka Assignment on Python will help you to sharpen your knowledge and programming skills.

1. What do you mean by List in Python?
2. The elements in the list can be of ______ type (any/fixed)
3. Elements in the list are enclosed in _____ brackets
4. Values in the list are called _______.
5. Lists are ________ in nature (heterogeneous/homogeneous)
6. List is a _________ data type. (Linear/non-linear)
7. Elements in the list are separated by ______.
8. Write the code to create an empty list named ‘L’.
9. Write a code to create list of any three colors named ‘color’.
10. What do you mean by nested list
11. Write the code to create the list of::
a. Five vegetables
b. Vowels
c. First 10 natural numbers
d. Square of first 5 natural numbers.
e. Any five names of your friends
f. All the alphabets of word “Taj Mahal”
g. First five multiples of 6.
12. Write a code to convert the string “Practice” into list.
13. Write the output of the following:
>>> d = “a*hj?”
>>> list(d)
14. Write the output of the following:
>>>a = “String”
>>>list (a)
15. Write the output of the following:
>>> a = list ()
>>> a
16. What is list() function?
17. Write the output of the following:
>>> a = ‘string’
>>> a= input(‘ Enter any string ‘)
>>> a = list(a)

Related Posts

If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to contribute@cbsetoday.com See your article appearing on the cbsetoday.com main page and help other students/teachers.