Clear all list items in python by using clear function
View All Python Programs Source Code list1 = [“keyboard”, “mouse”,”jyostic”] print(“Old List”) print(list1) list1.clear() print(“Updated List”) print(list1) Output Old List [‘keyboard’, ‘mouse’, ‘jyostic’] Updated List [] View All Python Programs
Clear all list items in python by using clear function Read More »