inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

금동민님의 게시글

금동민 금동민

@joshuakeum8186056

수강평 작성수
-
평균평점
-

게시글 4

질문&답변

도와주십시오 선생님 ㅠㅠ

from random import * L = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] L1 = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] L2 = [ 8 , 9 ] L3 = [ 10 ] def random_item ( L ): return L[randint( 0 , len (L) - 1 )] for station in random_item(L): if station in L1: print (station + "번 역에 열차가 진입하고 있습니다" ) elif station in L2: break else : print (station, "번 역은 종점입니다." )

좋아요수
0
댓글수
7
조회수
381

질문&답변

도와주십시오 선생님 ㅠㅠ

빠른 답변 고맙습니다 ㅎㅎ 그런데 말씀해주신 대로 해봤더니 TypeError: 'int' object is not iterable 이라고 뜹니다 ㅠㅠ 여러번 질문드려 죄송합니다 ㅠㅠ

좋아요수
0
댓글수
7
조회수
381