Question 1 |
x[1:3] | |
x[3:] | |
x[:2] | |
x[:3] | |
x[-1:-3] |
Question 2 |
dict.items() | |
dict.values() | |
none of them | |
dict.keys() | |
dict.values() |
Question 3 |
x[0] | |
x[1] | |
x[-2] | |
x[2] | |
x[-1] |
Question 4 |
delete() | |
del() | |
empty() | |
remove() | |
clear() |
Question 5 |
4 | |
2 | |
3 | |
1 | |
0 |
Question 6 |
up() | |
lower() | |
upper() | |
convert() | |
down() |
Question 7 |
("eagle","bear","wolf") | |
(["eagle","bear","wolf"]) | |
"eagle","bear","wolf" | |
{"eagle","bear","wolf"} | |
["eagle","bear","wolf"] |
Question 8 |
4 | |
12 | |
2 | |
6 | |
8 |
Question 9 |
#This is x code | |
/This is x code | |
//This is x code | |
-This is x code | |
*This is x code |
Question 10 |
True | |
False | |
None of them | |
{1,2,3,4} | |
{10,1,20,2,3} |
Question 11 |
& | |
// | |
== | |
|| | |
% |
Question 12 |
print(I love Python!) | |
print("I love Python!") | |
all of them | |
print "I love Python!" | |
print(I love Python!): |
Question 13 |
none of them | |
join(-) | |
join("-") | |
-.join(x) | |
"-".join(x) |
Question 14 |
[-1, 1, 2, 3, 4, 5, 6, 7] | |
[0, 1, 2, 3, 4, 5, 6, 7, 8] | |
[0, 2, 4, 6] | |
[1, 2, 3, 4, 5, 6, 7] | |
[-1, 0, 1, 2, 3, 4, 5, 6, 7] |
Question 15 |
{3,4,5} | |
False | |
True | |
0 | |
{12,17,56,80,92} |
Question 16 |
[...] - Matches any single character in brackets. | |
$ - Matches end of line. | |
\d - Matches strings. | |
^ - Matches beginning of line. | |
\w - Matches word characters. |
Question 17 |
0, 30, 2 | |
5, 30, 5 | |
5, 20, 5 | |
0, 25, 10 | |
0, 30, 10 |
Question 18 |
Count
| |
none of them | |
_Count | |
count5 | |
20count |
Question 19 |
list[1][2][2][0] | |
list[1][1][2][0] | |
list[1][2][2][1] | |
list[0][2][2][0] | |
list[1][2][1][1] |
Question 20 |
split | |
index | |
replace | |
join | |
strip |
Gokhan Kosem is a Network Engineer, Instructor and the Founder of IPCisco.com with 15+ years of experience in Cisco, Nokia, Huawei, Juniper, Linux, Service Provider Networks, Routing and Switching technologies.
He has worked on the backbone networks of major service providers and network vendors including Nortel, Alcatel-Lucent (Nokia) and has extensive hands-on experience with Cisco, Huawei, Juniper and Nokia networking technologies.
He has trained thousands of networking students worldwide through IPCisco.com, Udemy, books, labs, quizzes, and educational content across multiple social media platforms.
IPCisco.com | Best Route to Your Dreams