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