Write a Python function that Given a string, display only those characters which are present at an even index number


Topic: Write a Python function that Given a string, display only those characters which are present at an even index number

Solution

def printEveIndexChar(str):
  for i in range(0, len(str)-1, 2):
    print("index[",i,"]", str[i] )



List all Python Programs