Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Hidden_Word solution in Uncategorized category for The Hidden Word by Elena_Korljukova
def search_word(arr, w):
for i in range(len(arr)):
if w in arr[i]:
return i+1, arr[i].index(w)+1, i+1, arr[i].index(w) + len(w)
def checkio(text, word):
t = [''.join([j.lower() for j in i if j != ' ']) for i in text.split('\n')]
q = search_word(t,word)
if q:
return list(q)
else:
n = max([len(i) for i in t])
t = [i.ljust(n) for i in t]
t1 = [''.join([t[j][i] for j in range(len(t))]) for i in range(n)]
q1 = search_word(t1,word)
return [q1[1]] + [q1[0]] +[q1[3]] + [q1[2]]
June 6, 2020
Comments: