Replaced strings by index in python

  indexing, loops, python, replace, string

In python:

Input 1: python
Input 2: a
Output: aython
        pathon
        pyahon
        pytaon
        pythan
        pythoa

How to code in python for this

Source: Python Questions

LEAVE A COMMENT