In this program, we will take a string as input and print characters at even places in a string.
Steps to solve the program
- Take a string as input.
- Use the range function to find the even places from the length of the string.
- Print only those characters at even places in a string using Indexing.
#Input string
string ="sqatools"
for i in range(len(string)):
if i%2 == 0:
#Printing output
print(string[i], end = "")
Output :
saol