for i in range(5):
globals()["test{}".format(i)] = i
print(test0, test1, test2, test3, test4)
'Python > python 개인 소장용 코드' 카테고리의 다른 글
Python, txt파일 읽어오기 (0) | 2023.03.28 |
---|---|
Python 폴더 생성 함수 (0) | 2023.03.28 |
Python, 리스트 내의 요소 다루기 (split, replace, set) (0) | 2023.03.28 |
Python, pandas 데이터 결측치를 한눈에 확인시켜주는 코드 (0) | 2023.03.28 |
이중 딕셔너리 생성코드 (0) | 2022.11.27 |