Network disconnected
Description
numbers
에 5가 들어있을때, "5가 있다"를 출력하도록 빈칸을 채워 보세요.
리스트에 값이 들어있는지 확인려면 in
연산을 이용하면 됩니다. 아래의 예제를 참고하여 문제를 해결해 보세요.
# 12라는 값이 리스트에 들어있는지 확인하는 코드
n = 12
if n in list1: # list1에 12가 있으면 print문이 실행됩니다.
print('{}가 리스트에 있다.'.format(n))
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
numbers = [1,2,3,4,5]
if in :
print("5가 있다")
Result
Stop
Result of [Run Test] or [Submit] will be displayed here