Podcast
Questions and Answers
What does the list method insert(i,x) do?
What does the list method insert(i,x) do?
What does the list method remove(x) do?
What does the list method remove(x) do?
What does the del statement do in Python when used with a list?
What does the del statement do in Python when used with a list?
What error is raised when trying to access an index out of bound in a list?
What error is raised when trying to access an index out of bound in a list?
Signup and view all the answers
What is the output of the code 'print('a b c'.split())'?
What is the output of the code 'print('a b c'.split())'?
Signup and view all the answers
What does the expression len(['p', 's', 'y']) return?
What does the expression len(['p', 's', 'y']) return?
Signup and view all the answers
What does the code 2 * ['a'] produce?
What does the code 2 * ['a'] produce?
Signup and view all the answers
What does the method remove() do for a list?
What does the method remove() do for a list?
Signup and view all the answers
Which function is used to find the number of elements in a list?
Which function is used to find the number of elements in a list?
Signup and view all the answers
What does the expression ['add', 'class', 'contains', 'delattr'] represent?
What does the expression ['add', 'class', 'contains', 'delattr'] represent?
Signup and view all the answers