What can you do if you don’t like a long package path like this one?
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?
What is the expected behavior of the following snippet?
It will:
What is the expected output of the following code?
How many elements will the list2 list contain after execution of the following snippet?
list1 = [False for i in range (1, 10) ]
list2 = list1 [-1:1:-1]
What would you use instead of XXX if you want to check whether a certain ‘ key' exists in a dictionary called diet? (Select two answers)
II
if XXX:
print("Key exists")
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers)
Which of the listed actions can be applied to the following tuple? (Select two answers)
What is the expected behavior of the following code?
Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers.)
Assuming that the code below has been placed inside a file named code.py and executed successfully which of the following expressions evaluate to True? (Select two answers)
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)
Which of the following words can be used as a variable name? (Select two valid names)
With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Select two answers)
What is the expected output of the following code if existing_file is the name of a file located inside the working directory?
Which of the following lambda function definitions are correct? (Select two answers)
What is the expected behavior of the following code?
An operator able to perform bitwise shifts is coded as (select two answers)
Which of the following expression evaluate to True? (Select two answers)
A)
B)
C)
D)
What can you deduce from the following statement? (Select two answers)
str = open('file.txt', "rt")
Which of the equations are True? (Select two answers)