Computer Science, asked by amanyadavji7982, 2 months ago

find the output of print([1,2,8,9]<[9,1])​

Answers

Answered by yashasvi2646
1

Answer:

MARK ME AS BRAINLIEST ANSWER. THANKS ME FOR THE REPLY

Explanation:

List is a collection in python. It is similar to the array of most languages. We often need 'list' in our programs. Imagine you are writing a program to store marks of every student in a class of 50. Taking 50 different variables is not a good option and here comes list in action.

Python 2 Python 3

a = []

Output

a is a list here (empty list). [ ] represents a list.

Python 2 Python 3

a = [1,2,3,4]

print(a)

Output

[1, 2, 3, 4]

Here, 'a' is a list of four integers.

Python 2 Python 3

print(type([]))

Output

<class 'list'>

As you can see that type([]) is giving us list. This means that '[]' is a list as mentioned above.

Similar questions