CYBR 2370 Brainscape - Week 6 Flashcards
Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program?
PYTHONPATH
Which of the following environment variable for Python contains the path of an initialization file containing Python source code?
PYTHONSTARTUP
Which of the following environment variable for Python is used in Windows to instruct Python to find the first case-insensitive match in an import statement?
PYTHONCASEOK
Which of the following environment variable for Python is an alternative module search path?
PYTHONHOME
Is python a case sensitive language?
TRUE
Which of the following data types is not supported in python?
Slice
Which of the following data types is not supported in python?
Generics
What is the output of print str if str = ‘Hello World!’?
Hello World!
What is the output of print str[0] if str = ‘Hello World!’?
H
What is the output of print str[2:5] if str = ‘Hello World!’?
llo
What is the output of print str[2:] if str = ‘Hello World!’?
llo World!
What is the output of print str * 2 if str = ‘Hello World!’?
Hello World!Hello World!
What is the output of print list if list = [ ‘abcd’, 786 , 2.23, ‘john’, 70.2 ]?
[ ‘abcd’, 786 , 2.23, ‘john’, 70.2 ]
What is the output of print list[0] if list = [ ‘abcd’, 786 , 2.23, ‘john’, 70.2 ]?
abcd
What is the output of print list[1:3] if list = [ ‘abcd’, 786 , 2.23, ‘john’, 70.2 ]?
[786, 2.23]