Computer Science, asked by Satyajit8915, 1 year ago

What is the output of the following code? print type([l,2])

Answers

Answered by Anonymous
14

<class 'list'>

Lists are formed by placing a comma-separated list of expressions in square brackets

Plz mark as brainlist if you like it

Answered by Anonymous
5

<class 'list'> is the output for print type([1,2]).

  • type is a python function that displays the function type of its contents,
  • Since the elements are enclosed within the square brackets and differentiated with a comma.
  • This is the format of list.
  • List is a collection which is ordered and can also have duplicate values.
  • Syntax for lists : listname = [1,2,3,4,5] or ["apple", banana"]
Similar questions