#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목Loof1 실습 질문2019-10-14 20:20작성자도레미파솔라시도a=[1,2,1,8,9,4,2,5,1,3]b=int(input("Decide your number:"))c=[]for x in a: if x<b: c.append(x) else: print("")print(c) 이렇게 입력하면 Decide your number:5 [1, 2, 1, 4, 2, 1, 3] 라고 잘나오는데 a=[1,2,1,8,9,4,2,5,1,3] b=int(input("Decide your number:")) for x in a: c=[] if x<b: c.append(x) else: print("") print(c)Decide your number:4이렇게 하면 그냥 [3] 이라고만 나옵니다. 이유좀 알려주시면 감사드리겠습니다. 목록수정삭제답변글쓰기 댓글 [3] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전list in list 실습파일 질문입니다.dg2019-10-14다음구구단 질문파파파파이썬2019-10-14 Powered by MangBoard | 워드프레스 쇼핑몰 망보드