아래의 코드를 실행하면 로또번호 6개를 추출해준다. import random lottery_numbers = random.sample(range(1, 46), 6) print(lottery_numbers) 실행시 결과 화면, 1개만 추출하면 너무 아쉬워서 10개 추출을 시켜보자면... import random for i in range(10): lottery_numbers = random.sample(range(1, 46), 6) print(lottery_numbers) 위 코드를 실행하면 다음과 같이 10개의 리스트가 출력된다. 이것을 조금 업그레이드 해서 GUI (graphical user interface) 모드로 만들고 싶다면, import random import tkinter as tk def..
2023.2.2. 이제 되는 것 같다. 나의 경우 Visual Code 를 사용하는데, 비쥬얼 스튜디오 코드에서 파이썬을 적용시킬 때 인터프리터를 연결해줘야한다... [해결방법] (Ctrl) + (Shift) + (P)를 누른 후 (Python 인터프리터 선택 하기) pip install wheel DEPRECATION: pefile is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible repla..