add python in swap elements