Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Upgraded with making square solution in Creative category for The Hidden Word by MrPod
def checkio(text, word):
text = text.replace(' ', '').lower().split('\n')
text = list(map(lambda x: f'{x:{len(max(*text, key=len))}}', text))
for i, row in enumerate(text):
if word in row:
return [i + 1, row.find(word) + 1, i + 1, row.find(word) + len(word)]
text = list(map(''.join, zip(*text)))
for i, row in enumerate(text):
if word in row:
return [row.find(word) + 1, i + 1, row.find(word) + len(word), i + 1]
Aug. 19, 2018
Comments: