name = 'Kang'
phone = "010"
count = 78
list_A = [1, 2, 3, 4, 5]
tuple_A = (1, 2, 3, 4, 5)
dict_A = {"a": "string", "b": "number"}
dic_A.keys()
dic_A.values()
bool_A = True
bool_B = False
a = 1
'''
a: 식별자(변수명)
=: 대입연산자
1: 변수
=> 대입연산자는 항상 오른쪽을 먼저 실행하고 결과를 식별자에 대입
'''
number = 10
day = "three"
print("%d, %s" % (number, day))
10, three
number = 10
day = "three"
print("{0}, {1}".format(number, day))
10, three
number = 10
day = "three"
print(f'{number}, {day}')
10, three
f = open('파일명.확장명', 'r | w | a')
f.write(문자열 포멧팅)
f = close()
if 조건이 참이면:
실행문 실행
elif 조건이 참이면:
실행문 실행
else:
실행문 실행
for i in 요소:
실행문
for i in range([시작값,], 마지막 값, step):
while 조건이 참이면:
실행문
def createFunc(n):
result = n + 1
print(result)
createFunc(1)
2