What is the output of the following code? print type([l,2])
Answers
Answered by
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
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
English,
6 months ago
Hindi,
6 months ago
Social Sciences,
6 months ago
Chemistry,
1 year ago
Computer Science,
1 year ago