Python Basics - List Manipulation (Part-2) - Question and Answers
CBSE Class 11 - Informatics Practices
Based on syllabus of Class 11 Informatics Practices, here are important Questions and Answers covered for the chapter List Manipulation.
The questions and answers will familiarise you with basics concepts of Python Lists and provide a framework for understanding the programming concepts.Software development isn’t any one thing, but a myriad of practices that coalesce into software in the end. Python has been a versatile language and is used by companies to write all sorts of applications.
List is an important data structure, part of a core Python. Lists have a variety of uses including data science, statistics and scientific computing. List is considered as a collection of objects and is ordered and changeable(mutable). It allows duplicate members.
Q1: What is the output of the following code?
list =['I','N','D','I','A']
print(list[0:3])
print(list[3:])
print(list[:])
Answer:
['I', 'N', 'D']
['I', 'A']
['I','N','D','I','A']
Q2: What is the output of the following code? What does the '+' operator' do in the code snippet?