'Is there a way to reverse a string without using slicing here?
I am struggling to incorporate a good way to reversing this string without using any slicing. Any prompt help would be greatly appreciated.
string = input ("please enter a string")
reversed_string = string[::-1]
if string == reversed_string:
print(string, "is a palindrome")
else:
print(string, "is not a palindrome")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
