Dhroov7 / Hacktoberfest2019

This repo has been removed by hacktoberfest still contributors are still welcome but your PR will not count in hacktoberfest.
246 stars 727 forks source link

Write a function that tests whether a string is a palindrome. #104

Closed Dhroov7 closed 4 years ago

Dhroov7 commented 4 years ago
rahulbisht12 commented 4 years ago

def isPalindrome(str):

# Run loop from 0 to len/2 
for i in xrange(0, len(str)/2): 
    if str[i] != str[len(str)-i-1]: 
        return False
return True

main function

s = "malayalam" ans = isPalindrome(s)

if (ans): print("Yes") else: print("No")

munkhorgil commented 4 years ago

Done https://github.com/Dhroov7/HacktoberFest2019/pull/106

Dhroov7 commented 4 years ago

Don't add the code here.

azinudinachzab commented 4 years ago

122

omerjaved11 commented 4 years ago

fix for #104, palindrome #112

emanuellima1 commented 4 years ago

Done in #329