분류 전체보기(299)
-
Python (Variables)
Python (Variables) (Variable) is the name of the space used to store data in memory. Data or objects stored in variables can change continuously within a program. Learn how to declare and use variables. The sequence is as follows. Variable declaration and assignment Naming Variables Variable declaration and assignment In Python, declaration and assignment of variables occurs simultaneously. decl..
2022.01.02 -
Python (Basics)
Python (Basics) Learn the basics of the Python programming language. The sequence is as follows. (Keyword) (Identifier) (Indentation) (Comment) (Keyword) (Keyword) is a string that is already reserved in the Python language, It cannot be used as the name of a variable or function, etc. There are 33 keywords in Python, as listed below. False, None, True, and, as, assert, break, class, continue, d..
2022.01.02 -
Python - Getting Started with Programming
Python - Getting Started with Programming Python is a dynamic typing, object-oriented programming language. Python is a high-level, general-purpose, multi-platform, interpreted language. The design goal of the Python language is to focus on programmer productivity and readability of code. Python is oriented towards minimalism. One of the most striking features is that it does not use semicolons ..
2022.01.02 -
[파이썬 / 클롤링] 네이버 뉴스 / 위에서 2개만 크롤링 (쉬어요)
네이버 뉴스 위에서 2개 최신 것만 보여주는 코드 입니다. newsnumer 숫자를 바꿔주면, 원하는 숫자만큼 (최대 10) 나옵니다. 쉽죠?! count를 이해하면 됩니다. (아래와 같이 원하는 숫자만 넣어주면 됩니다. 시작은 0부터) import urllib.parse from bs4 import BeautifulSoup from selenium import webdriver import time import re driver = webdriver.Chrome() naverNewsUrl = 'https://news.naver.com/main/list.naver?mode=LS2D&mid=shm&sid1=101&sid2=260' driver.get(naverNewsUrl) time.sleep(3) htm..
2022.01.01 -
[파이썬 / append ] list.append()에서 복수변수 입력시 오류
안녕하세요. append() 에서 입력하다 보면 터미널에서 아래와 같은 오류 메시지를 얻었을 것입니다. TypeError: append() takes exactly one argument (2 given) append에서 복수 숫자를 입력하고 싶으면, 아래 코드로 실해하시면 됩니다. numbers = [] numbers.append(3) numbers.append(1) print(numbers) numbers2 = [] numbers2.extend([3, 1]) print(numbers2) numbers = [] numbers.append(3, 1) # 이렇게 하면 안돼요 numbers.append(1) print(numbers) 자료가 도움이 되셨다면, 아래 유튜브 오냐TV로 구독과 좋아요~ 꼭 부탁 ..
2022.01.01 -
파이썬 / python / 데이터 타입 / Data type (예.
아래 코드를 실행해 보면, 파이썬에서 데이터를 어떻게 인식하는 지를 알 수 있습니다. 구글 크롤링할 때 도움이 됩니다. 어떤 자료를 불러서 읽어서 soup 으로 저장해 낼 것이냐 할 때, 용이합니다. print(type(123)) # print(type(12.3)) # print(type('123')) # print(type('abc')) # print() print(type([])) # print(type([1, 2, 3, 4, 5])) # print(type(['a', 'b', 'c', 'd', 'e'])) # print() print(type({})) # print(type(())) # print(type(None)) # print(type('하이')) # 자료가 도움이 되셨다면, 아래 유튜브 오냐..
2021.12.31