Transfer list items from one to another list in python
View All Python Programs Source Code list1 = [“keyboard”, “mouse”,”joystick”,”laptop”] list2 = [] for no in list1: if “a” in no: list2.append(no) print(list2) Output [‘keyboard’, ‘laptop’] View All Python Programs
Transfer list items from one to another list in python Read More »