Python 2, (削除) 88 (削除ここまで) 85(削除) 85 (削除ここまで)(削除) 84 (削除ここまで) 77 bytes
f=lambda x,y,d='.':y in x and y*x.count(y)+'.'+f+d+f(y,x.replace(y,'')).replace('.','')or' .'+x'+d+x
Saved
- -1 byte, thanks to LyricLy
- -7 bytes, thanks to Dead Possum
Python 2, (削除) 88 (削除ここまで) 85 bytes
f=lambda x,y:y in x and y*x.count(y)+'.'+f(y,x.replace(y,'')).replace('.','')or' .'+x
Python 2, (削除) 88 (削除ここまで) (削除) 85 (削除ここまで)(削除) 84 (削除ここまで) 77 bytes
f=lambda x,y,d='.':y in x and y*x.count(y)+d+f(y,x.replace(y,''),'')or' '+d+x
Saved
- -1 byte, thanks to LyricLy
- -7 bytes, thanks to Dead Possum
Python 2, 86(削除) 88 (削除ここまで) 85 bytes
lambdaf=lambda x,y:(y in x and y*x.count(y)+'.'+f(y,x.replace(y,'')).replace('.',''))if y in x else'or' .'+x
Python 2, (削除) 55 (削除ここまで)(削除) 51 (削除ここまで) 4986 bytes
lambda x,y:(y*x.count(y)+'. '+y'+f(y,x.replace(y,'')*).replace('.',''))if y in x)or' else' .'+x