Skip to content

Instantly share code, notes, and snippets.

@eneshazr
Created November 11, 2021 15:10
Show Gist options
  • Save eneshazr/66211574a8de67d4cafb51087d13b9f3 to your computer and use it in GitHub Desktop.
Save eneshazr/66211574a8de67d4cafb51087d13b9f3 to your computer and use it in GitHub Desktop.
Python ile boşluksuz metinden kelime bulma
# Finding words from text without spaces with Python.
def kelimeBul(kelime, find):
s = 0
yeni = []
for i in kelime:
if ("".join(yeni) == find):
break
elif find[s] == i:
# print(find[s], i)
yeni.append(i)
s += 1
else:
s = 0
yeni.clear()
print("".join(yeni))
kelime = "yazilimfuryasi.com"
find = "furya"
kelimeBul(kelime, find)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment