In this program, we will take a string as input and get a string made of 4 copies of last 2 characters
Steps to solve the program
- Take a string as input.
- Select the last 2 characters from the string using indexing.
- Multiply them by 4 to get 4 copies.
- Print the output
#Input string
string = "Sqatools"
#printing output
print(string[-2:]*4)
Output :
lslslsls