Introduction to Python Set-2
Instruction:- Number of Questions : 25 Total Marks : 25 Each question carry 1 Marks. No negative marking
Introduction to Python Set-2 Read More »
Instruction:- Number of Questions : 25 Total Marks : 25 Each question carry 1 Marks. No negative marking
Introduction to Python Set-2 Read More »
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 »
View All Python Programs Source Code list1 = [“keyboard”, “mouse”, “joystick”] l=len(list1) no=0 while no<l: print(list1[no]) no=no+1 Output keyboard mouse jyostic View All Python Programs
Print all list items by using while loop in python Read More »
View All Python Programs Source Code list1 = [“keyboard”, “mouse”, “joystick”] l=len(list1) for n in range(l): print(list1[n]) Output keyboard mouse jyostic View All Python Programs
Print all list items by using index posting in python Read More »
View All Python Programs Source Code list1 = [“keyboard”, “mouse”, “joystick”] for n in list1: print(n) Output keyboard mouse jyostic View All Python Programs
Print all list items by using loop in python Read More »
View All Python Programs Source Code list1=[1,2,3] list2=[“Art”,”Mart”,”Heart”] join=list1+list2 print(join) Output [1, 2, 3, ‘Art’, ‘Mart’, ‘Heart’] View All Python Programs
Join two list in a single list in python Read More »
View All Python Programs Source Code list = [“keyboard”, “mouse”,”jyostic”,”laptop”,”camera”] newlist=list.copy() print(newlist Output [‘keyboard’, ‘mouse’, ‘jyostic’, ‘laptop’, ‘camera’] View All Python Programs
Copy list items from one to another list by using copy() function in python Read More »
View All Python Programs Source Code list = [“keyboard”, “mouse”,”jyostic”,”laptop”,”camera”] list.reverse() print(list) Output [‘camera’, ‘laptop’, ‘jyostic’, ‘mouse’, ‘keyboard’] View All Python Programs
Print the list items in reverse order by using reverse() function in python Read More »
View All Python Programs Source Code list = [“keyboard”, “mouse”,”jyostic”,”laptop”,”camera”] list.sort(key = str.lower) print(list) Output [‘camera’, ‘jyostic’, ‘keyboard’, ‘laptop’, ‘mouse’] View All Python Programs
Short the list in lower case ascending order in python Read More »
View All Python Programs Source Code list = [“keyboard”, “mouse”,”joystick”,”laptop”, “camera”] list.sort(reverse=True) print(list) Output [‘mouse’, ‘laptop’, ‘keyboard’, ‘joystick’, ‘camera’] View All Python Programs
Short the list in descending order in python Read More »