Company: LeadSquared_8aug
Difficulty: medium
Problem Description Your task is to implement the TelephoneBook class in Python. The class manages a list of student contacts and performs file operations to store and retrieve them. You must implement the following methods in the TelephoneBook class: __init__(self, contacts: list) : A constructor that initializes the object with a list of contacts . Each contact is a list containing two strings: [name, mobileNumber] . addContacts(self) -> None : Creates a text file named contacts.txt and writes all contact details into it. Each contact should be written on a new line in the format name:mobileNumber . getContacts(self, startsWith: str) -> list : Reads the data from contacts.txt and returns a list of all contacts where the name starts with the string provided in startsWith . The returned list should contain contacts in the original format [name, mobileNumber] . If no contacts match, return an empty list. Input Constructor : contacts is a list of lists of strings, e.g., [["John", "