파이썬세트
-
Python Chapter04방뚝딱 학습노트 2023. 8. 11. 22:27
교재 : 멘토씨리즈 파이썬 while문의 중첩 while문의 내부에 또다른 while 문이 나타나는 것을 while문의 중첩이라고 한다.반복해서 처리해야하는 대상이 2개 이상이면 while문의 중첩이 필요하다. 예제1) 총 5일 동안 하루에 3시간씩 수업을 한다. 예제2) 구구단 2~9단까지 출력 예제3) 예제4) 1부터 100사이의 모든 정수 중에서 7의 배수만 출력하는 프로그램을 구현하세요 예제5) 컬렉션(39p) ‘모음’이라는 뜻으로 파이썬에서는 여러값을 묶어서 관리하는 자료형입니다. 리스트(list) 추가, 수정, 삭제가 언제나 가능 append - 첫번째 값을 지움, insert(인덱스, 값) pop(인덱스) - 인덱스를 쓰지 않으면 맨 뒤에 값을 지움 a =[1,2,3] 튜플(tupe) 저장된..