Intermediate Python Lesson 2: Solution: Sequence Types
Slicing Strings
hello = 'Hello, world!'
a = hello[0]
b = hello[-2]
c = hello[1:5]
d = hello[-6:]
e = hello[::2]
f = hello[::-1]
Palindrome
def make_palindrome(s):
return s + s[::-1]
Are there any shorter palindromes that also start with s? Can yo...
philipdevblog.hashnode.dev1 min read