Untitled
9 Questions
8 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

what is the output when we execute list("python")?

  • ['p','y','t','h','o','n'] (correct)
  • ['python']
  • python
  • ["python"]
  • what value will be printed by the following code? my_list=list("python") print((my_list[3]))

  • y
  • t
  • h (correct)
  • o
  • what is the output of the following code? list1=['abc','zee','PYlan'] print(max(list1))

  • abc
  • zee (correct)
  • PYlan
  • list1
  • what is the output of the following code? list1=['abc','zee','PYlan'] print(list1[-2][-1])

    <p>e</p> Signup and view all the answers

    what is the output of the following code? list1=[23,44,56,88,90,21] print(list1[:-3])

    <p>[23,44,56]</p> Signup and view all the answers

    what will be the output of the following code? a=[1,2,3,5,6] b=a.append(8) print(b)

    <p>none</p> Signup and view all the answers

    what will be the output of the following code? list1=[23,90,56,88,90,44] list1.remove(90) print(list1)

    <p>[23,56,88,90,44]</p> Signup and view all the answers

    what will be the output of the following code? list1=[23,49,56,88,90,44] print(list1.index(3))

    <p>valueError:3 is not in list</p> Signup and view all the answers

    what will be the output of the following code? list1=[7,8,6] print(list1*2)

    <p>[7,8,6,7,8,6]</p> Signup and view all the answers

    More Like This

    Python Lists and List Operations
    10 questions
    Python List Operations Quiz
    20 questions
    Python List, Tuple, and Set Operations
    24 questions
    Python Variable and List Operations Quiz
    16 questions
    Use Quizgecko on...
    Browser
    Browser