Assignment 5 Python
Assignment 5 Python
Q.2 Explain unpacking sequences, mutable sequences, and list comprehension with example.
Write a program to sort list of dictionaries by values in Python – Using lambda function.
Q.3 Discuss File I/O in Python. How to perform open, read, write, and close into a file ? Write a
Python program to read a file line-by-line store it into a variable.
Q.4 Explain iterator. Write a program to demonstrate the Tower of Hanoi using function.
Q7. Discuss and differentiate iterators and recursion. Write a program for recursive Fibonacci
series.
Himani
CSE