1.Write a function that takes a string and returns a new string consisting of its first and last character.

Image description

2.Write a function that reverses a given string.

Image description

3.Given a string, extract and return a substring from the 3rd to the 8th character (inclusive).

Image description

4.Write a function that returns every second character from a given string.

Image description

5.Write a function that replaces the middle third of a string with asterisks. If the length of the string is not divisible by 3, adjust the middle third accordingly.

6.Write a function that checks if a given string is a palindrome (reads the same backward as forward).

7.Given an email address, extract and return the domain.
Ans: How to find incase there are multiple occurrences? Loop?
Image description

Image description

8.Write a function that returns every third character from a given string.

Image description

9.Write a function that extracts and returns characters at even indices from a given string.

Image description

10.Write a function that skips every second character and then reverses the resulting string.

Image description