A. How is indexing and slicing of tuples done? B. Which operator is used to access the elements in a tuple? C.  Can a programmer pass a variable to a function? If yes, how? 10. What is the function of...

A. How is indexing and slicing of tuples done?

B. Which operator is used to access the elements in a tuple?


C.  Can a programmer pass a variable to a function? If yes, how? 10. What is the function of zip()?


D. What is the role of the * operator within the zip() function?


E.  Describe the basics of dictionaries. 1. Write a function which takes a tuple as a parameter and returns a new tuple as the output, where every other element of the input tuple is copied, starting from the fi rst one.


T = (‘Hello’,’Are’,’You’,’Loving’,’Python?’)


Output_Tuple = (‘Hello’, ‘You’, ‘Python?’)




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here