# map(함수, 반복가능한_자료)
#int,str

# map() 함수는 리스트나 다른 반복 가능한(iterable) 객체의 각 요소에 같은 함수를 적용할 때 사용한다.

# map 객체로 나오기 때문에, 필요하면 list()나 tuple()로 변환해야 한다.



str_nums = ["10", "20", "30", "40"]

# 문자열을 int로 변환
int_nums = list(map(int, str_nums))

print(int_nums)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: