ACTUAL Exam Questions and CORRECT
Answers
append() - CORRECT ANSWER Appends an element to the end of a list
pop() - CORRECT ANSWER Removes the element at a specified position in a list
remove() - CORRECT ANSWER Removes the first occurrence of a specified element
from a list
extend() - CORRECT ANSWER Adds specified list elements to the end of the current list
index() - CORRECT ANSWER Returns the position of the first occurrence of a specified
value in a list
len() - CORRECT ANSWER Returns the number of items in an object or the number of
characters in a string
max() - CORRECT ANSWER Returns the item with the highest value in an iterable
min() - CORRECT ANSWER Returns the item with the lowest value in an iterable
sum() - CORRECT ANSWER Returns the sum of all items in an iterable
id() - CORRECT ANSWER Returns a unique id for the specified object
, random.choice() - CORRECT ANSWER Returns a randomly selected element from a
specified sequence
Slicing strings - CORRECT ANSWER Extracting a substring from a string based on
specified indices
Assessing characters in string - CORRECT ANSWER Evaluating individual characters
within a string
Reading data from file - CORRECT ANSWER Extracting information stored in a file for
processing
Print a list as a string - CORRECT ANSWER Displaying the elements of a list as a single
string
strip() - CORRECT ANSWER Removes leading and trailing whitespaces from a string
lstrip() - CORRECT ANSWER Removes leading whitespaces from a string
rstrip() - CORRECT ANSWER Removes trailing whitespaces from a string
mutable vs. immutable - CORRECT ANSWER Comparison between objects that can or
cannot be modified after creation
element - CORRECT ANSWER Value or item stored within a list or string
index - CORRECT ANSWER Position or location of an element in a list or string
empty list - CORRECT ANSWER A list containing zero elements