DATABASE FUNDAMENTALS
BASICS OF BIG DATA
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which of these pieces of code would return the name “Harry” from the following list?nameList = ["John", “Harry", “Jesse", “John", “Harry", “Harry"]
|
nameList()
|
|
nameList[1]
|
|
NameList(4)
|
|
nameList["4"]
|
Explanation:
Detailed explanation-1: -Explanation: Elements of lists are stored in contagious memory location is the true regarding lists in Python.
Detailed explanation-2: -Expert-Verified Answer The list in python is given as the sequence of the items.
Detailed explanation-3: -Repeated execution of a set of statements is called iteration. Python has two statements for iteration – the for statement, which we met last chapter, and the while statement.
There is 1 question to complete.