我想在字符串中交换每对字符.'2143'成为'1234','badcfe'成为'abcdef'.
'2143'
'1234'
'badcfe'
'abcdef'
我怎么能用Python做到这一点?
python string
python ×1
string ×1