Skip to content

Tag Archives: python-tuple

1) What is the output of the following program?  PYTHON L = list('123456') L[0] = L[5] = 0 L[3] = L[-2] print(L) a) [0, ‘2’,… Read More
Prerequisite: Lists and Tuples 1) What is the output of the following program?   PYTHON List = [True, 50, 10] List.insert(2, 5)    print(List, "Sum is: ",… Read More
Prerequisite: List and Tuples Note: Output of all these programs is tested on Python3 1) What is the output of the following program?  PYTHON L1 =… Read More
We use two operators * (for tuples) and ** (for dictionaries).  Background Consider a situation where we have a function that receives four arguments. We want… Read More
Python Tuple is a collection of objects separated by commas. In some ways, a tuple is similar to a Python list in terms of indexing,… Read More
In the previous article, we read about the basics of Python. Now, we continue with some more python concepts. Strings in Python:  A string is… Read More