class Solution(object):

def findKthLargest(self, nums, k):

"""

:type nums: List[int]

:type k: int

:rtype: int

flag = nums[k-1]

bigger = []

smaller = []

for index, num in enumerate(nums):

if index == k-1:

continue

if num < flag:

smaller.append(num)

else:

bigger.append(num):

if len(bigger) == k-1:

return flag

elif len(bigger) >= k:

return self.findKthLargest(bigger, k)

else

return self.findKthLargest(smaller, k-len(bigger)-1)

"""

return sorted(nums)[-k]

- list item