Skip to content

Instantly share code, notes, and snippets.

@ozgurkaracam
Last active December 27, 2015 11:42
Show Gist options
  • Save ozgurkaracam/8184316b2f9df2ebf880 to your computer and use it in GitHub Desktop.
Save ozgurkaracam/8184316b2f9df2ebf880 to your computer and use it in GitHub Desktop.
Özyineli fonksiyonla palindrom kontrolü.
#python 3.5.x
def palind(kelime):
kelime=list(kelime)
if len(kelime)>1:
if kelime.pop(0)!=kelime.pop():
return False
else:
return palind(kelime)
else:
return True
print (palind(input("Kelime giriniz.")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment