인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

cyyu8295421's profile image
cyyu8295421

asked

Introduction to Python Algorithm Problem Solving (Coding Test Preparation)

1. Setting the environment and solving the Kth divisor

input에 있는 데이터 읽어오기

Written on

·

172

0

만약 띄어쓰기가 아닐때에는 어떻게 읽어오나요?

그리고 map함수는 어떨때쓰는것인지 잘 이해가 안갑니다ㅠㅠ

python코테 준비 같이 해요!

Answer 1

0

codingcamp님의 프로필 이미지
codingcamp
Instructor

안녕하세요^^

map(지정함수, 리스트) 형태로 리스트의 각 요소에 지정함수를 적용하는 것입니다.

a, b=map(float, [1, 2])

print(a, b)

위에 처럼 하면 정수 1, 2가 실수형이 되어 1.0, 2.0으로 출력됩니다.

cyyu8295421's profile image
cyyu8295421

asked

Ask a question