Question 1 |
{1,2,3,4} | |
False | |
None of them | |
True | |
{10,1,20,2,3} |
Question 2 |
list[1][2][2][1] | |
list[1][2][2][0] | |
list[1][1][2][0] | |
list[0][2][2][0] | |
list[1][2][1][1] |
Question 3 |
[0, 2, 4, 6] | |
[0, 1, 2, 3, 4, 5, 6, 7, 8] | |
[-1, 0, 1, 2, 3, 4, 5, 6, 7] | |
[-1, 1, 2, 3, 4, 5, 6, 7] | |
[1, 2, 3, 4, 5, 6, 7] |
Question 4 |
20count | |
count5 | |
none of them | |
Count
| |
_Count |
Question 5 |
True | |
{12,17,56,80,92} | |
0 | |
False | |
{3,4,5} |
Question 6 |
x[3:] | |
x[:3] | |
x[-1:-3] | |
x[:2] | |
x[1:3] |
Question 7 |
dict.values() | |
none of them | |
dict.items() | |
dict.values() | |
dict.keys() |
Question 8 |
x[1] | |
x[-2] | |
x[0] | |
x[-1] | |
x[2] |
Question 9 |
8 | |
6 | |
12 | |
2 | |
4 |
Question 10 |
-This is x code | |
#This is x code | |
//This is x code | |
/This is x code | |
*This is x code |
Question 11 |
3 | |
0 | |
2 | |
1 | |
4 |
Question 12 |
$ - Matches end of line. | |
[...] - Matches any single character in brackets. | |
^ - Matches beginning of line. | |
\w - Matches word characters. | |
\d - Matches strings. |
Question 13 |
0, 30, 10 | |
5, 30, 5 | |
0, 25, 10 | |
5, 20, 5 | |
0, 30, 2 |
Question 14 |
% | |
// | |
|| | |
& | |
== |
Question 15 |
("eagle","bear","wolf") | |
"eagle","bear","wolf" | |
["eagle","bear","wolf"] | |
{"eagle","bear","wolf"} | |
(["eagle","bear","wolf"]) |
Question 16 |
print "I love Python!" | |
print("I love Python!") | |
print(I love Python!) | |
all of them | |
print(I love Python!): |
Question 17 |
index | |
split | |
replace | |
strip | |
join |
Question 18 |
-.join(x) | |
join("-") | |
none of them | |
"-".join(x) | |
join(-) |
Question 19 |
upper() | |
convert() | |
lower() | |
down() | |
up() |
Question 20 |
del() | |
clear() | |
remove() | |
empty() | |
delete() |