일반적으로 사용되는 Python 함수 모듈

유형()

값의 데이터 유형 확인


integer = 10
float_ = 1.23
string = "hello world!!"
list_ = (1, 2, 3)
tuple_ = (1, 2, 3)
set_ = {1, 2, 3}
dictionary = {"key": "value"}
boolean = True

print(type(integer)) # <class 'int'>
print(type(float_)) # <class 'float'>
print(type(string)) # <class 'str'>
print(type(list_)) # <class 'list'>
print(type(tuple_)) # <class 'tuple'>
print(type(set_)) # <class 'set'>
print(type(dictionary)) # <class 'dict'>
print(type(boolean)) # <class 'bool'>

분할()

문자열을 목록으로 변환


연결하다()

목록을 문자열로 변환


대리자()

문자열 바꾸기


누르다()

인쇄하기 좋은

임의로


시간

시간을 다루다


약속 시간

약속 처리


출력 값은 문자열이 아닌 datetime 클래스입니다.

https://docs.python.org/en/3/library/datetime.html#strftime-and-strptime-format-codes

datetime — 기본 날짜 및 시간 유형

소스 코드: Lib/datetime.py datetime 모듈은 날짜와 시간을 조작하기 위한 클래스를 제공합니다. 날짜 및 시간 산술이 지원되는 동안 구현의 초점은 효율적인 특성에 있습니다.

docs.python.org