# What will be the output of the following Python code lst=[3,4,6,1,2] lst[1:2]=[7,8] print(lst)

1.  [3, 7, 8, 6, 1, 2]

2.  Syntax error

3.  [3,[7,8],6,1,2]

4.  [3,4,6,7,8]

4

[3, 7, 8, 6, 1, 2]

Explanation :
No Explanation available for this question

# Which of the following is a Python tuple

1.  [1, 2, 3]

2.  (1, 2, 3)

3.  {1, 2, 3}

4.  {}

4

(1, 2, 3)

Explanation :
No Explanation available for this question

# Suppose t = (1, 2, 4, 3), which of the following is incorrect

1.  print(t[3])

2.  t[3] = 45

3.  print(max(t))

4.  print(len(t))

4

t[3] = 45

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>t=(1,2,4,3) >>>t[1:3]

1.  (1, 2)

2.  (1, 2, 4)

3.  (2, 4)

4.  (2, 4, 3)

4

(2, 4)

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>t=(1,2,4,3) >>>t[1:-1]

1.  (1, 2)

2.  (1, 2, 4)

3.  (2, 4)

4.  (2, 4, 3)

4

(2, 4)

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>t = (1, 2, 4, 3, 8, 9) >>>[t[i] for i in range(0, len(t), 2)]

1.  [2, 3, 9]

2.  [1, 2, 4, 3, 8, 9]

3.  [1, 4, 8]

4.  (1, 4, 8)

4

[1, 4, 8]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code d = {"john":40, "peter":45} d["john"]

1.  40

2.  45

3.  “john”

4.  “peter”

4

40

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>t = (1, 2) >>>2 * t

1.  (1, 2, 1, 2)

2.  [1, 2, 1, 2]

3.  (1, 1, 2, 2)

4.  [1, 1, 2, 2]

4

(1, 2, 1, 2)

Explanation :
No Explanation available for this question

# What will be the output of the following Python code >>>t1 = (1, 2, 4, 3) >>>t2 = (1, 2, 3, 4) >>>t1 < t2

1.  true

2.  false

3.  error

4.  none

4

false

Explanation :
No Explanation available for this question

1.  1

2.  2

3.  5

4.  Error

4