0% found this document useful (0 votes)
3 views2 pages

Python Module3 QuestionBank

The document is a question bank for a course on Python Programming for Data Science, focusing on lists, tuples, and sets. It includes detailed questions about their features, operations, and differences, along with examples for each topic. The content is structured to facilitate understanding of data structures in Python programming.

Uploaded by

jasma.cojective
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Module3 QuestionBank

The document is a question bank for a course on Python Programming for Data Science, focusing on lists, tuples, and sets. It includes detailed questions about their features, operations, and differences, along with examples for each topic. The content is structured to facilitate understanding of data structures in Python programming.

Uploaded by

jasma.cojective
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

||JAI SRI GURUDEV||

Sri Adichunchanagiri Shikshana Trust ®


SJB INSTITUTE OF TECHNOLOGY
An Autonomous Institution under Visvesvaraya Technological University, Belagavi
Approved by AICTE, New Delhi, Accredited by NAAC, New Delhi with ‘A+’ Grade, Accredited by National Board of Accreditation, New Delhi
Recognized by UGC, New Delhi with 2(f) and 12(B), Certified by ISO 9001-2015
No. 67, BGS Health & Education City, Dr. Vishnuvardhan Road, Kengeri, Bengaluru - 560 060

Department of Computer Science & Engineering (Data Science)

Course Name: Python Programming for Data Science Course Code: 23CDE312
Faculty: Mrs. Jasma Bhavani B

Question Bank
Module 3
List and Tuples
1. Explain lists in Python. Discuss their features and importance with suitable examples.

2. Explain list indexing with examples. Write examples for both positive and negative indexing.

3. Explain list slicing in detail with syntax and examples.

4. Explain any three list operations: appending, removing, and accessing elements with examples.

5. Explain different methods of removing elements from a list: remove(), pop(), and del with suitable
examples.

6. Discuss mutability in lists. Why are lists mutable? Explain with examples.

7. Write detailed notes on creating lists, accessing elements, and nested lists with examples.

8. What are tuples? Explain their characteristics and uses in Python with examples.

9. Explain indexing and slicing in tuples with syntax and examples.

10. Explain tuple operations such as concatenation, repetition, membership, length, and accessing
elements with examples.

11. Explain immutability in tuples. How can you modify a tuple indirectly? Explain with examples.

12. Explain the procedure to modify tuples using list conversion. Give a detailed example.

13. Explain tuple methods: count(), min(), sum(), enumerate(), and any() with examples.

14. Compare lists and tuples. Explain differences in mutability, performance, memory, and usage.

15. What is a set? Explain its characteristics with examples.

16. Explain the advantages of sets compared to lists. Why are sets faster for membership testing?

17. Explain different ways of creating a set with examples.

18. Explain membership operators (in, not in) in sets with examples.

19. Explain adding elements to a set using add() and update() with examples.
||JAI SRI GURUDEV||
Sri Adichunchanagiri Shikshana Trust ®
SJB INSTITUTE OF TECHNOLOGY
An Autonomous Institution under Visvesvaraya Technological University, Belagavi
Approved by AICTE, New Delhi, Accredited by NAAC, New Delhi with ‘A+’ Grade, Accredited by National Board of Accreditation, New Delhi
Recognized by UGC, New Delhi with 2(f) and 12(B), Certified by ISO 9001-2015
No. 67, BGS Health & Education City, Dr. Vishnuvardhan Road, Kengeri, Bengaluru - 560 060

Department of Computer Science & Engineering (Data Science)

20. Explain deletion operations in sets: remove(), discard(), pop(), and clear() with suitable examples.

21. Explain mathematical set operations in Python (union, intersection, difference, symmetric
difference) with examples.

22. Explain subset, superset, and disjoint set operations with examples.
23. Explain the difference between lists, tuples, and sets based on mutability, order, uniqueness, and
operations.

24. Explain the working of all() and any() with suitable examples.

25. Explain enumerate() function and demonstrate its use with tuples or lists.

26. Explain the importance of hashing in sets. Which data types can be added to sets and why?

27. Explain with examples how sets ensure uniqueness in data.

You might also like