I want to remove the brackets and the apostrophes from a list that contains several strings. My code is -
list_of_libraries = []
class Library :
def __init__(self, librarys_name, *listofbooks):
self.listofbooks=listofbooks
self.libraryname=librarys_name
self.lent_list = []
global list_of_libraries
list_of_libraries.append(self.libraryname)
abcd = ["Harry Potter and the chamber of secrets", "Harry Potter and the philosophers stone"]
Gauravs_library = Library("Gaurav's library", abcd)
Larrys_books = ["Beginners python course", "Python game development course"]
Larrys_library = Library("Larry's library", Larrys_books)
print(list_of_libraries)
Output coming -
["Gaurav's library", "Larry's library"]
Desired output -
Gaurav's library, Larry's library