TIL Day 7.

Jen Devver·2024년 2월 21일

내배캠 TIL

목록 보기
7/91

python 문법 심화 1-8강까지

vscode 이용

가상환경
venv
>> source venv/bin/activate
code convention
- 
지역 변수 vs. 전역 변수
local variable vs. global variable
type()

int integer -> 정수
float -> 실수
string -> 문자열
list -> 리스트 []
tuple -> 튜플 ()
set -> 집합
dictionary -> 딕셔너리 { : }
boolean -> 불리안 참/거짓 True/False
등의 자료형을 판단할 수 있는 함수
split()
join()

string = "hello/python/world"
string_list=string.split("/") 했을 경우
print(string_list)의 결과는 ['hello', 'python', 'world]

string = " ".join(string_list)
print(string) 의 결과는 hello python world
replace()
-> 변경할 문자.replace("변경 전 문자", "변경 후 문자")

pprint()
-> pretty print 예쁘게 출력해주는 데에 도움을 준다

random
time
datetime
조건문 심화
함수의 return 타입 확인

Today I Thought

심화는 역시 심화인가... 직관적으로 와닿지 않아서 다시 한 번 보고.. 생각하고.. 하다보니 시간이 오래 걸렸다.

profile
발전 중...

0개의 댓글