๐ฉ Github Console๋ก Pull request ํ๋ ๋ฒ
Repo โ Add file โ Create new file
main์๋ค๊ฐ โcheck_stem.pyโ โ Commit changes
๊ทธ ์ดํ์ main โ View all branches โ New branch
New branch name โtest_stemโ โ Create new branch
๋ค์ ๋ฉ์ธ ํ๋ฉด์ผ๋ก ๋์๊ฐ์ โ Code โ main โ test_stem ํด๋ฆญ
check_stem.py ํด๋ฆญ โ ์ค๋ฅธ์ชฝ์ ์๋ Edit this file ํด๋ฆญ
๋ฐ์ ์ ๊ณต ๋ ์ฝ๋ ์์ฑ โ Commit changes โ Commit changes
def word_count(file_path: str) -> dict:
"""
Count the frequency of each word in a file.
"""
counts = {}
with open(file_path, 'r') as f:
for line in f:
words = line.split()
for w in words:
word = w.lower()
counts[word] = counts.get(word, 0) + 1
return counts
์ด์ Pull requests โ ์์ ์๋ก ์๊ธด Compare & pull request ์ด๋ New pull request ๋ ์ค์ ํ๋ ์ ํ
New pull request ๋๋ ์ ๋ โ compare: main ํด๋ฆญ โ test_stem ํด๋ฆญ โ Create pull request โ Create pull requests