FUNDAMENTALS OF COMPUTER

DATABASE FUNDAMENTALS

BASICS OF BIG DATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of these is the correct code for creating a list of names?
A
nameList = John, Harry, Jesse, John, Harry, Harry
B
nameList = ("John", “Harry", “Jesse", “John", “Harry", “Harry")
C
nameList = ["John", “Harry", “Jesse", “John", “Harry", “Harry"]
D
nameList = [John, Harry, Jesse, John, Harry, Harry]
Explanation: 

Detailed explanation-1: -Expert-Verified Answer The list in python is given as the sequence of the items.

Detailed explanation-2: -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.