class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
for i in range(len(nums)):
another = target  nums[i]
if another in nums:
try:
j = nums.index(another)
if i != j:
return [i, j]
except ValueError as e:
# There has no item in list
continue
return []
My Python solution without using HashMap


Yes, You'r right !! I also check out https://wiki.python.org/moin/TimeComplexity
It's O(n) because of linear search.
