Could not Test/Submit because of IndentationError


#1
class Solution:
    # @param A : integer
    # @return a list of integers
def sieve(self, n):
    res = list()
    prime = [True for i in range(n + 1)]
    p = 2

    while (p * p <= n):

    if (prime[p] == True):

        # Update all multiples of p
        for i in range(p * 2, n + 1, p):
            prime[i] = False

    p += 1

prime[0] = False
prime[1] = False
# Print all prime numbers
for p in range(n + 1):
    if prime[p]:
        res.append(p)

return res

#2

Add a tab space for the if statement after the while. And of course everything that comes after if inside if.