Post

@PythonPr Answer: (B) 4
In Python, lists are zero-indexed, meaning the first element is at index 0, the second at index 1, and so on.
x = [7, 4, 9] defines a list named x.
The elements are:
7 is at index 0.
4 is at index 1.
9 is at index 2.
print(x[1]) accesses and prints the
English

@PythonPr Answer: B) 4
List indices:
[7, 4, 9]
0 1 2
x[1] = element at index 1 = 4
For beginners: Python uses 0-based indexing. First element is index 0, second is index 1, etc.
English

@PythonPr this comes under list.
Answer is 4
the list in python are Zero-indexed, meaning x(0) is the first elemt (7), so , x(1) is the second element(4), and x(2) is the third elemnt(9)...
English

@PythonPr Output B) 4 — Python lists are 0-indexed, so x[1] is the 2nd element.
English

@PythonPr Option B : 4 because index of an array starts with 0 and 4 is at first position
English

@PythonPr Knowing many languages: Is there one language where the answer is *not* B(4)?
English






























