Consider the string str1 = "Global Warming".
Write statements in Python to implement the following:
(a) To display the last four characters.
(b) To replace all the occurrences of letter 'a' in the string with "*".
(a)
str1 = "Global Warming" last_four = str1[-4:] print(last_four)
ming
(b)
str1 = "Global Warming" replaced_str = str1.replace('a', '*') print(replaced_str)
Glob*l W*rming