Python Arrays Questions and Answers

Take Exam

Python Programming - Arrays Questions with Answers explain how to store and access multiple values efficiently. These Python Arrays Questions are essential for TCS, SSC, and Infosys exams covering fundamental data structure concepts

Python Arrays

Showing 10 of 25 questions

21. How do you concatenate two lists?

  • list1 + list2
  • list1.concat(list2)
  • list1.join(list2)
  • list1.merge(list2)
Show Answer Report

22. What is the time complexity of the count() method?

  • O(n)
  • O(1)
  • O(log n)
  • O(n²)
Show Answer Report

23. How do you insert an element at a specific position?

  • insert(index, element)
  • add(index, element)
  • put(index, element)
  • set(index, element)
Show Answer Report

24. What is a shallow copy vs deep copy?

  • Shallow copies references, deep copies objects
  • Shallow is faster, deep is slower
  • Shallow works for 1D, deep for 2D lists
  • There is no difference
Show Answer Report

25. How do you convert a list to a tuple?

  • tuple(list)
  • list.tuple()
  • convert_to_tuple(list)
  • list.freeze()
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test