输入两个整数,范围-231~231-1,交换两个数并输出。
a = input() b = a.split(",") c = [] for i in range(len(b)): for j in b[i].split("="): c.append(j) print(f"{c[0]}={c[-1]},{c[2]}={c[1]}")
import re m, n = map(str,input().split(",")) m1 = re.findall(r'\d+',m) n1 = re.findall(r'\d+',n) m2 = re.findall(r'\D+',m) n2 = re.findall(r'\D+',n) print(m2[0]+n1[0]+","+ n2[0]+m1[0])
s=input() m=s[0:2] a=s.index(',') m1=s[2:a] n=s[a+1:a+3] n1=s[a+3:] print(m+n1+','+n+m1)