Kk Lee
Kk Lee

Reputation: 17

Comparison Operation of List Data Structure on Python

Assuming that I have a List data strecture: list. And I see one code: list[:,0]>5 I don't know what it means? But I know what list[:,0] means.

I google it and read many in python.org but I can't acquire appropriate answer.

Upvotes: -2

Views: 30

Answers (1)

Kk Lee
Kk Lee

Reputation: 17

I realized it's a very simple thing:

list > 5 compares every elements of list with 5, if it is larger than 5 the result is True, else False. So if

list=[1,2,6]
list > 5
# -> [False, False, True].

Upvotes: -1

Related Questions