Question 1 |
list(x) | |
len(x) | |
find(x) | |
measure(x) | |
sort(x) |
Question 2 |
isspace() | |
istitle() | |
isdecimal() | |
isalpha() | |
isupper() |
Question 3 |
4 | |
3 | |
10 | |
0 | |
1 |
Question 4 |
3 | |
2 | |
1 | |
0 | |
4 |
Question 5 |
['bear', 'Dog', 'bird', 'cat', 'lion'] | |
['lion', 'bear', 'Dog', 'bird', 'cat'] | |
['bear', 'bird', 'cat', 'Dog', 'lion'] | |
['lion', 'cat', 'bear', 'Dog', 'bird'] | |
['lion', 'cat', 'bird', 'bear', 'Dog', ] |
Question 6 |
3 | |
4 | |
2 | |
1 | |
0 |
Question 7 |
None of them | |
True | |
False | |
{12,17,56,80,92} | |
{12,56,80} |
Question 8 |
"Hello"[1] | |
"Hello"[2] | |
"Hello"[-2] | |
"Hello"[0] | |
"Hello"[-1] |
Question 9 |
8.0 | |
16.0 | |
4.0 | |
20.0 | |
12.0 |
Question 10 |
[3] | |
[1, 2, 4, 5, 6] | |
[1, 2, 3, 4, 5] | |
[1, 2, 4, 5] | |
[1, 2, 3, 4, 5, 6] |
Question 11 |
continue | |
break | |
pass | |
else | |
elif |
Question 12 |
chc() | |
cmp() | |
union() | |
str() | |
len() |
Question 13 |
[0, 1, 2, 3, 4, ,5 6, 7, 8] | |
[2, 4, 6, 8] | |
[0, 2, 4, 6, 8] | |
[1, 2, 3, 4, ,5 6, 7, 8] | |
[0, 2, 4, 6] |
Question 14 |
a[2:2] = [3, 4, 5, 6] | |
a[2:] = [3, 4, 5, 6] | |
a[:3] = [3, 4, 5, 6] | |
a[3:2] = [3, 4, 5, 6] | |
a[0:2] = [3, 4, 5, 6] |
Question 15 |
x[-2] | |
x[0] | |
x[-1] | |
x[1] | |
x[3] |
Question 16 |
"".join(x) | |
x.join("-") | |
"-".join(x) | |
x.join("") | |
x.join() |
Question 17 |
i | |
o | |
d | |
g | |
l |
Question 18 |
abc1abc2 | |
none of them | |
abc
| |
20abc | |
_abc_ |
Question 19 |
MyFunc() | |
set MyFunc() | |
MyFunc(); | |
MyFunc(): | |
get MyFunc() |
Question 20 |
25 | |
25,50 | |
5,25,50 | |
50 | |
5,12,25,33,48,50,61 |