Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> s = str(input("Enter the String:"))
Enter the String:JAVA
>>> slice_mid=s[1:-1]
>>> slice_beg=s[0]
>>> slice_end=s[-1:]
>>> print("Resultant string is:",slice_end+slice_mid+slice_beg)
Resultant string: AAVJ
>>> 
