# Sort Array By Parity:
# Returns array of all the even elements of A followed by all the odd elements of A

class Solution:
    def isPowerOfTwo(self, n: int) -> bool:
        return [x for x in A if x % 2 == 0] + [x for x in A if x % 2 != 0]
fc62c4674f246280e50dc5304a0068caf2032ec5
<mask token>

class Solution:
    <mask token>

class Solution:

    def isPowerOfTwo(self, n: int) ->bool:
        return [x for x in A if x % 2 == 0] + [x for x in A if x % 2 != 0]

# Sort Array By Parity:
# Returns array of all the even elements of A followed by all the odd elements of A

class Solution:
    def isPowerOfTwo(self, n: int) -> bool:
        return [x for x in A if x % 2 == 0] + [x for x in A if x % 2 != 0]