a="grayorphanvillain" for k in "|/": t=k.join(a) print(t) #output: g ayo pha villai g|r|a|y|o|r|p|h|a|n|v|i|l|l|a|i|n g/r/a/y/o/r/p/h/a/n/v/i/l/l/a/i/n