题解 | #坐标移动#
坐标移动
https://www.nowcoder.com/practice/119bcca3befb405fbe58abe9c532eb29
x,y=0,0 str=input() l=str.split(";") for list in l: try: int(list[1:3]) except: continue if list[0]=="A": x-=int(list[1:3]) elif list[0]=="D": x+=int(list[1:3]) elif list[0]=="W": y+=int(list[1:3]) elif list[0]=="S": y-=int(list[1:3]) else: continue print(x,end=',') print(y)