1june

  • 홈

Python/Python Crash Course 11

Python Crash Course: 챕터 11

Testing code with pytest library1. Python includes a tool called pip that’s used to install third- party packages. Because pip helps install packages from external resources, it’s updated often to address potential security issues. So update pip first (open new terminal window and type the code below)python -m pip install --upgrade pippython -m pip install --upgrade 패키지_이름2. Now install pytestpy..

Python/Python Crash Course 2024.07.12

Python Crash Course: 챕터 10

Reading from a filefrom pathlib import Pathpath = Path('pi_digits.txt')contents = path.read_text()print(contents)Use Python Library called pathlibImport path classAssign variable to the object representing the file 'pi_digits.txt'Since this file is saved in the same directory as the .py file we’re writing, the filename is all that Path needs to access the file.Use read_text() method on the varia..

Python/Python Crash Course 2024.07.10
이전
1 2 3 4 ··· 6
다음
더보기
프로필사진

1june

summarised what I have learned 배운 내용 정리

  • 전체 글 (11)
    • Python (11)
      • Python Crash Course (11)
      • Side Projects (0)

티스토리툴바