Python Basic Grammar Cheat-Sheet
Calculate print(15/7) # 나눗셈, 2 print(15//7) # 몫, 2 print(15%7) # 나머지, 1 print(2**3) # 제곱근, 8Variable Type Type String Boolean Integer Float v = 1 print(type(v)) # int Tuple, Dictionary, Set Tuple 수정이 안되는 엘리먼트 집합 자료형 # define tuple = () tupleA = tuple() tupleA = (1, 2) tupleB = (3, 4) print( tupleA(0) ) # 1, 인덱스 접근 가능 tupleA + tupleB # (1, 2, 3, 4) tupleA * 2 # (1, 2, 1, 2) # use case ## switch x..
Program language/Python
2021. 4. 8. 23:13