
기본 코드
def solution(route):
east = 0
north = 0
for i in route:
if i == "N":
north += 1
elif i == "S" :
[빈칸]
elif i == "E" :
[빈칸]
elif i == [빈칸]:
[빈칸]
return [east, north]
코드 풀이
def solution(route):
east = 0
north = 0
for i in route:
if i == "N":
north += 1
elif i == "S" :
north -= 1
elif i == "E" :
east += 1
elif i == "W" :
east -= 1
return [east, north]