Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def palindrome(str)
- strings_1 = str.gsub(/\W/, "").downcase
- strings_2 == strings_1.reverse
- # if strings_1 == strings_2
- # puts "True"
- # else
- # puts "False"
- # end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement