Q. What is the output of the following program?
def REVERSE(L):
L.reverse()
return(L)
def YKNJS(L):
List = list()
List.extend(REVERSE(L))
print(List)
L = [1, 3.1, 5.31, 7.531]
YKNJS(L)

  • (A) [1, 3.1, 5.31, 7.531]
  • (B) [7.531, 5.31, 3.1, 1]
  • (C) IndexError
  • (D) AttributeError: „NoneTypeβ€Ÿ object has no attribute „REVERSEβ€Ÿ
πŸ’¬ Discuss
βœ… Correct Answer: (B) [7.531, 5.31, 3.1, 1]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
294
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
97%
Success Rate