Question On Python Datatypes and Built in Functions
Question On Python Datatypes and Built in Functions
TITUS NEWTON 1
39. How do you call a function?
40. What is a lambda function?
41. How do you define a lambda function?
42. What are the advantages of using lambda functions?
43. How do you use the "map()" function?
44. What is the purpose of the "filter()" function?
45. How do you use list comprehensions?
46. What is a generator?
47. How do you define a generator function?
48. What is the purpose of the "yield" keyword?
49. What is the difference between a list and a generator?
50. How do you iterate over elements in a list?
51. How do you iterate over key-value pairs in a dictionary?
52. How do you iterate over characters in a string?
53. What are the comparison operators?
54. How do you use comparison operators in conditional statements?
55. What is the purpose of the "if" statement?
56. How do you use the "else" statement?
57. How do you use the "elif" statement?
58. What is the purpose of the "and" and "or" keywords?
59. How do you use the "not" keyword?
60. What is the purpose of the "in" and "not in" keywords?
61. How do you use the "is" and "is not" keywords?
62. What is the purpose of the "pass" statement?
63. How do you use the "while" loop?
64. How do you use the "for" loop?
65. What is the purpose of the "range()" function?
66. How do you use the "break" statement in a loop?
67. How do you use the "continue" statement in a loop?
68. What is the purpose of the "enumerate()" function?
69. How do you use the "zip()" function?
70. How do you sort a list?
71. What is the purpose of the "sorted()" function?
72. How do you reverse a list?
73. How do you find the maximum or minimum value in a list?
74. How do you remove duplicates from a list?
75. What is a tuple unpacking?
76. How do you swap the values of two variables?
77. How do you check if a key exists in a dictionary?
78. How do you add a new key-value pair to a dictionary?
TITUS NEWTON 2
79. How do you remove a key-value pair from a dictionary?
80. How do you copy a dictionary?
81. How do you merge two dictionaries?
82. How do you check if a set is a subset of another set?
83. How do you add elements to a set?
84. How do you remove elements from a set?
85. What is the purpose of the "intersection()" method sets?
86. What is the purpose of the "union()" method sets?
87. What is the purpose of the "difference()" method sets?
88. What is the purpose of the "symmetric_difference()" method sets?
89. How do you create a frozen set?
90. What is the purpose of the "all()" function?
91. What is the purpose of the "any()" function?
92. What is the purpose of the "max()" function?
93. What is the purpose of the "min()" function?
94. What is the purpose of the "sum()" function?
95. What is the purpose of the "enumerate()" function?
96. What is the purpose of the "reversed()" function?
97. What is the purpose of the "zip()" function?
98. How do you convert a list to a tuple?
99. How do you convert a tuple to a list?
100. How do you convert a list to a set?
TITUS NEWTON 3