We want to know the index of the vowels in a given word, for example, there are two vowels in the word super (the second and fourth letters). 

So given a string "super", we should return a list of [2, 4].

        Some examples:
        Mmmm  => []
        Super => [2,4]
        Apple => [1,5]
        YoMama -> [1,2,4,6]

**NOTES:**

* Vowels in this context refers to: a e i o u y (including upper case)
* This is indexed from `[1..n]` (not zero indexed!)

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def vowel_indices(word):
	

Solutions:
def vowel_indices(word):
	return [i for (i, x) in enumerate(word, 1) if x.lower() in 'aeiouy']


def vowel_indices(word):
	return [index for (index, value) in enumerate(word.lower(), 1) if value in 'aeyuio']


VOWELS = set('aeiuoy')

def vowel_indices(word):
	return [i for (i, v) in enumerate(word.lower(), 1) if v in VOWELS]


def vowel_indices(word):
	vowels = frozenset(('A', 'E', 'I', 'O', 'U', 'Y', 'a', 'e', 'i', 'o', 'u', 'y'))
	idx_list = []
	for (idx, letter) in enumerate(word):
		if letter in vowels:
			idx_list.append(idx + 1)
	return idx_list


def vowel_indices(word):
	word = word.lower()
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	lst = []
	for index in range(len(word)):
		if word[index] in vowels:
			lst.append(index + 1)
	return lst


def vowel_indices(word):
	word = word.lower()
	vowel_lst = ['a', 'e', 'i', 'o', 'u', 'y']
	new_lst = []
	for index in range(len(word)):
		if word[index] in vowel_lst:
			new_lst.append(index + 1)
	return new_lst


is_vowel = set('aeiouyAEIOUY').__contains__

def vowel_indices(word):
	return [i for (i, c) in enumerate(word, 1) if is_vowel(c)]


def vowel_indices(words):
	word = words.lower()
	vowels = []
	i = 0
	for letter in word:
		i += 1
		if letter == 'a' or letter == 'e' or letter == 'i' or (letter == 'o') or (letter == 'u') or (letter == 'y'):
			vowels.append(i)
	return vowels


def vowel_indices(word):
	result = []
	for _ in range(len(word)):
		if word[_].lower() in 'aeiouy':
			result.append(_ + 1)
	return result


vowel_indices = lambda n: [i + 1 for (i, j) in enumerate(n) if j.lower() in 'aeiouy']


def vowel_indices(word):
	word = word.lower()
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	vowel_indicies = []
	for i in range(len(word)):
		if word[i] in vowels:
			vowel_indicies.append(i + 1)
		else:
			pass
	return vowel_indicies


def vowel_indices(word):
	return [count for (count, char) in enumerate(word, 1) if char.lower() in ['a', 'e', 'i', 'o', 'u', 'y']]


vowels = set('aeiouyAEIOUY')

def vowel_indices(word):
	return [i + 1 for (i, c) in enumerate(word) if c in vowels]


def vowel_indices(word):
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	return [i + 1 for i in range(0, len(word)) if word[i].lower() in vowels]


def vowel_indices(word):
	return [i + 1 for (i, lett) in list(enumerate(word.lower())) if lett in 'aeiouy']


def vowel_indices(word):
	return [i + 1 for (i, z) in enumerate(word) if z in ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']]


vowel_indices = lambda w: [i + 1 for (i, k) in enumerate(w) if k.lower() in 'aeiouy']


def vowel_indices(word):
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	ret = []
	ind = 1
	for z in word:
		if z.lower() in vowels:
			ret.append(ind)
		ind += 1
	return ret


def vowel_indices(word):
	vowels = 'aeiouyAEIOUY'
	result = []
	for i in range(0, len(word)):
		if word[i] in vowels:
			result.append(i + 1)
	return result


def vowel_indices(word):
	retVal = []
	vow = ['a', 'e', 'i', 'o', 'u', 'y']
	word = word.lower()
	i = 1
	for letter in word:
		if letter in vow:
			retVal.append(i)
		i += 1
	return retVal


import re

def vowel_indices(word):
	iter = re.finditer('[aeiouy]', word.lower())
	indices = [m.start(0) + 1 for m in iter]
	return indices


def vowel_indices(word):
	new_list = []
	vowels = ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'y', 'Y')
	for i in range(len(word)):
		if word[i] in vowels:
			new_list.append(i + 1)
	return new_list


def vowel_indices(word):
	return [loop + 1 for (loop, i) in enumerate(word) if i in 'aeiouyAEIOUY']


def vowel_indices(word):
	word = word.lower()
	res = []
	for i in range(len(word)):
		if word[i] in 'aeiouy':
			res.append(i + 1)
	return res


def vowel_indices(word):
	l = []
	for (i, letter) in enumerate(word):
		if letter in ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']:
			l.append(i + 1)
	return l


def vowel_indices(word):
	vowels = {'a', 'e', 'i', 'o', 'u', 'y'}
	return [i for (i, letter) in enumerate(word.lower(), start=1) if letter in vowels]


def vowel_indices(word):
	vowels = 'aeuioyAEUIO'
	l = []
	for i in range(len(word)):
		if word[i] in vowels:
			l.append(i + 1)
	return l


def vowel_indices(word):
	out = []
	for (i, s) in enumerate(word):
		if s.lower() in 'aeiouy':
			out.append(i + 1)
	return out


vowel = 'aeiouy'

def vowel_indices(word):
	ans = []
	for i in range(len(word)):
		if word[i].lower() in vowel:
			ans.append(i + 1)
	return ans


def vowel_indices(word):
	ans = []
	c = 1
	for i in [char for char in word.lower()]:
		if i in 'aeiouy':
			ans.append(c)
		c += 1
	return ans


def vowel_indices(word):
	return [i + 1 for (i, n) in enumerate(word.lower()) if n in ['a', 'e', 'i', 'o', 'u', 'y']]


def vowel_indices(word):
	i = 0
	positions = []
	vowels = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']
	for letter in word:
		if letter in vowels:
			positions.append(word.index(letter, i) + 1)
		i += 1
	return positions


def vowel_indices(word):
	index = 1
	res = []
	for i in word.lower():
		if i in 'aeiouy':
			res.append(index)
		index += 1
	return res


def vowel_indices(w):
	return [i + 1 for (i, c) in enumerate(w) if c in 'aeiouyAEIOUY']


def vowel_indices(word):
	return [i + 1 for i in range(len(word)) if word[i].lower() in 'aeioyu']


def vowel_indices(word):
	pw = []
	vowles = 'aeiouy'
	for i in range(len(word)):
		if word[i].lower() in vowles:
			pw.append(i + 1)
	return pw


def vowel_indices(word):
	import re
	return [index + 1 for (index, element) in enumerate(word.lower()) if re.match('[aeiouy]', element)]


def vowel_indices(word):
	res = []
	for (idx, letter) in enumerate(word.lower(), 1):
		if letter in 'aeiouy':
			res.append(idx)
	return res


def vowel_indices(word):
	word = word.lower()
	vowels = 'aeiouy'
	l = []
	sum = 1
	for i in word:
		if i in vowels:
			l.append(sum)
			sum = sum + 1
		else:
			sum = sum + 1
	return l


def vowel_indices(word):
	vowels = list()
	test = 'aeiouyAEIOUY'
	for i in range(0, len(word)):
		if test.find(word[i]) >= 0:
			vowels.append(i + 1)
	return vowels


VOWELS = 'aeiouyAEIOUY'

def vowel_indices(word):
	return [i + 1 for (i, l) in enumerate(word) if l in VOWELS]


def vowel_indices(word):
	count = []
	words = word.lower()
	for i in range(len(words)):
		if words[i] in 'aeiouy':
			count.append(i + 1)
	return count


def vowel_indices(w):
	return [x[0] + 1 for x in enumerate(w.lower()) if x[1] in 'aeiouy']


def vowel_indices(word):
	vowels = ['a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U', 'y', 'Y']
	letters = list(word)
	answer = list()
	i = 0
	while i < len(letters):
		if letters[i] in vowels:
			answer.append(i + 1)
		i = i + 1
	return answer


def vowel_indices(word):
	vowels = 'aeiouy'
	list = []
	counter = 0
	word = word.lower()
	for letter in word:
		counter += 1
		if letter in vowels:
			list.append(counter)
	return list


def vowel_indices(word):
	return [i + 1 for i in range(0, len(word)) if word.lower()[i] in 'aeiouy']


def vowel_indices(word):
	vowel = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']
	count = 1
	lst = []
	for letter in word:
		if letter in vowel:
			lst.append(count)
		count += 1
	return lst


def vowel_indices(word):
	retval = []
	word = word.lower()
	for (counter, value) in enumerate(word):
		if value == 'a':
			retval.append(counter + 1)
		if value == 'e':
			retval.append(counter + 1)
		if value == 'i':
			retval.append(counter + 1)
		if value == 'o':
			retval.append(counter + 1)
		if value == 'u':
			retval.append(counter + 1)
		if value == 'y':
			retval.append(counter + 1)
	return retval


def vowel_indices(word):
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	index_list = []
	for (indx, letter) in enumerate(word.lower()):
		if letter in vowels:
			index_list.append(indx + 1)
	return index_list


def vowel_indices(word):
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	return [i for (i, x) in enumerate(word.lower(), start=1) if x in vowels]
print(vowel_indices('Apple'))


def vowel_indices(word):
	vowels = ['a', 'e', 'i', 'o', 'u', 'y']
	return [i + 1 for (i, c) in enumerate(list(word)) if c.lower() in vowels]


import re

def vowel_indices(word):
	return [k + 1 for (k, l) in enumerate(word) if bool(re.match('[aeuioy]', l, re.I))]


def vowel_indices(word):
	return [word.find(c, i) + 1 for (i, c) in enumerate(word) if c.lower() in 'aeiouy']


def vowel_indices(word):
	vowels = 'aeiouyAEIOUY'
	return [i for (i, l) in enumerate(word, start=1) if l in vowels]


def vowel_indices(word):
	return [idx for (idx, i) in enumerate(word, start=1) if i.lower() in 'aeiouy']


import unittest
VOWEL = {'a', 'e', 'i', 'o', 'u', 'y'}

def vowel_indices(word):
	return [index for (index, ele) in enumerate(word, 1) if ele.lower() in VOWEL]

class TestVowelIndices(unittest.TestCase):

	def test_vowel_indices(self):
		word = 'Super'
		actual = vowel_indices(word)
		self.assertEqual(actual, [2, 4])


def vowel_indices(word):
	res = []
	for (i, char) in enumerate(word):
		if char in 'aeiouyAEIOUY':
			res.append(i + 1)
	return res


def vowel_indices(word):
	vowels = 'aeiouyAEIOUY'
	count = 0
	vowel_list = []
	for x in word:
		count += 1
		if x in vowels:
			vowel_list.append(count)
	return vowel_list


def vowel_indices(word):
	li = []
	vowel = ['a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U', 'y', 'Y']
	for i in range(len(word)):
		for j in range(len(vowel)):
			if word[i] == vowel[j]:
				li.append(i + 1)
	return li


def vowel_indices(word):
	return [a + 1 for (a, c) in enumerate(word) if c in 'aeiouyAEIOUY']


def vowel_indices(word):
	output = []
	for i in range(0, len(word)):
		if word[i] in 'aeiouyAEIOUY':
			output.append(i + 1)
	return output


def vowel_indices(word):
	n = 0
	a = []
	for i in word:
		n = n + 1
		if i.lower() in ['a', 'e', 'i', 'o', 'u', 'y']:
			a.append(n)
	return a


def vowel_indices(word):
	lst = [i + 1 for i in range(0, len(word)) if word[i] in 'aeiouyAEIOUY']
	return lst


def vowel_indices(word):
	word = word.lower()
	new_list = []
	vow = ['a', 'o', 'e', 'i', 'u', 'y']
	for x in range(len(word)):
		if word[x] in vow:
			new_list.append(x + 1)
	return new_list


def vowel_indices(word):
	word = word.lower()
	word = list(word)
	vowel = ['a', 'e', 'i', 'o', 'u', 'y']
	result = []
	for (i, j) in enumerate(word):
		if j in vowel:
			result.append(i + 1)
	return result


def vowel_indices(word):
	word = word.lower()
	a = ['a', 'e', 'i', 'o', 'u', 'y']
	res = []
	count = 1
	for i in word:
		if i in a:
			res.append(count)
		count += 1
	return res


def vowel_indices(word):
	return [index + 1 for (index, ele) in enumerate(word.lower()) if ele in 'aeiouy']


def vowel_indices(word):
	location = []
	for letter in range(len(word)):
		if word[letter] in 'aeiouyAEIOUY':
			location.append(letter + 1)
	return location


def vowel_indices(word):
	word = word.casefold()
	found = 'aeiouy'
	return [i + 1 for i in range(len(word)) if word[i] in found]


def vowel_indices(word):
	return [p for (p, c) in enumerate(word.lower(), 1) if c in 'aeiouy']


def vowel_indices(word):
	vowels = 'aeiouyAEIOUY'
	result = [i + 1 for (i, char) in enumerate(word) if char in vowels]
	return result


L = 'aeiouyAEIOUY'
vowel_indices = lambda s: [i + 1 for (i, c) in enumerate(s) if c in L]


def vowel_indices(word):
	l = []
	for num in range(len(word)):
		if word[num] in 'aeiouyAEIOUY':
			l.append(num + 1)
	return l


def vowel_indices(word):
	l = []
	for i in range(len(word)):
		if word[i] in 'aeiouAEIOUyY':
			l.append(i + 1)
	return l


def vowel_indices(word):
	return [i + 1 for (i, c) in enumerate(word) if c in 'aAeEiIoOuUyY']


def vowel_indices(word):
	word = word.lower()
	vowels_lst = ['a', 'e', 'i', 'o', 'u', 'y']
	index_lst = []
	for i in range(len(word)):
		if word[i] in vowels_lst:
			index_lst.append(i + 1)
	return index_lst


def vowel_indices(word):
	vowel = 'aeiouyAEIOUY'
	return [x + 1 for x in range(len(word)) if word[x] in vowel]


def vowel_indices(word):
	return [i for (i, x) in enumerate(word, 1) if x in 'AEIOUYaeiouy']


def vowel_indices(word):
	retVal = []
	checkList = 'aeiouy'
	for (i, x) in enumerate(word.lower()):
		print(('Looking at ', x))
		try:
			l = checkList.index(x)
			retVal.append(i + 1)
			print(('think this is a vowel', x))
		except ValueError:
			print(('discarded', x))
	return retVal


def vowel_indices(word):
	return [i + 1 for (i, x) in enumerate(list(word)) if x in 'aeiouyAEIOUY']


def vowel_indices(word: str):
	i = []
	word = word.lower()
	word = list(word)
	for l in 'aeiouy':
		while l in word:
			i.append(word.index(l) + 1)
			word[i[-1] - 1] = ' '
	return sorted(i)


def vowel_indices(word):
	r = []
	for (i, c) in enumerate(word):
		if c in 'aeiouyAEIOUY':
			r.append(i + 1)
	return r