Network disconnected
Description
다음 코드는 list1
과 list2
가 모두 list클래스의 인스턴스인지를 검사합니다. 코드의 빈칸을 채워넣어 정상 동작하도록 만들어 보세요.
인스턴스가 특정 클래스의 인스턴스인지 알아보는 방법으로 isinstance
를 이용할 수 있습니다.
아래의 코드를 참고하여 문제를 해결해 보세요.
list1 = list("hello")
list2 = list("hello")
isinstance(list1, list) #True
isinstance(list2, list) #True
Question type: Fill in the blank
- You need to fill in the blank with the appropriate code.
- You cannot modify the given code.
- An error message will appear in the result if you leave the blank empty.
1
2
3
4
5
list1 = list(range(10))
list2 = [1, 2, 3]
if isinstance( , list) and isinstance( , list):
print("list1과 list2는 둘 다 list클래스 입니다.")
Result
Stop
Result of [Run Test] or [Submit] will be displayed here
내가 제출한 코드가 왜 틀렸는지 프로그래머스 AI에게 물어보세요.
제출 후 채점하기를 눌러 30점 이상인 경우 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.
베타 기간 동안에는 한 문제당 1번만 물어볼 수 있어요.