def say_hello(name, age):
print(f"Hello {name} you are {age} years old")
# positional : ์๋ฆฌ๊ฐ ์ ํด์ ธ์๋ ๊ฒฝ์ฐ
# ์๋ฆฌ์ ์์๋ฅผ ๊ณ ๋ คํ ์ํ์ธ๋ฐ ๊ทธ ์์๋ฅผ ๊ณ ๋ คํ์ง์์๊ฑฐ๋ผ๋ฉด Error๊ฐ ๋ฐ์ํ๋ค.
say_hello("nico", 12)
# ์๋ฆฌ์ ๋ํด ์ ๊ฒฝ์ฐ์ง ์๋ ๋์ ์ argument์ ์ด์ ์ ๋ง์ถ๋ฉด ์๋์ ๊ฐ์ด ์ธ ์ ์๋ค.
say_hello(age=12, name="nico")
# get : ์น ์ฌ์ดํธ๋ฅผ ๋ฐ์์ค๋ ๋ฐฉ
from requests import get
from bs4 import BeautifulSoup
base_URL = "https://weworkremotely.com/remote-jobs/search?term"
search_term = "Python"
# ๋ฌธ์์ด ์์ ๋ณ์๋ฅผ ๋ฃ์ ์ ์๋ f๋ฅผ ์ฌ์ฉ
response = get(f"{base_URL}{search_term}")
if response.status_code != 200:
print("Can't request website")
else:
Soup = BeautifulSoup(response.text, "html.parser")
print(Soup.find_all("section", class_="jobs"))
# class_ : class๋ผ๋ keyword๊ฐ ์ด๋ฏธ Python์์ ์ฌ์ฉ๋๊ณ ์์ผ๋ฏ๋ก