python 2.7 or python range로 바꾸면 동작
https://01s2-min.tistory.com/11
def printProgress (iteration, total, prefix = '', suffix = '', decimals = 1, barLength = 100): formatStr = "{0:." + str(decimals) + "f}" percent = formatStr.format(100 * (iteration / float(total))) filledLength = int(round(barLength * iteration / float(total))) bar = '#' * filledLength + '-' * (barLength - filledLength) sys.stdout.write('\r%s |%s| %s%s %s' % (prefix, bar, percent, '%', suffix)),..
https://webnautes.tistory.com/1178#recentComments
zip - 동일한 개수로 이루어진 자료형을 묶어 주는 역할을 하는 함수이다. ex) zip([1,2,3],[4,5,6])->(1,4),(2,5),(3,6) eye - np.eye() - 단위 행렬로 만들어줌(numpy 활용)ex) C = np.eye(2) -> 2x2 identity matrix list 생성하는 다양한 방법- a = [0] * 5- a = [0,0,0,0,0]- a = [0 for i in range(5)] for _ in range- 인덱싱을 무시하고 싶을 때 쓴다.ex) for i in range(10):print("hello world")-> i가 쓰이지 않으므로 _를 쓴다. super().__init__class Animal( ): def __init__( self, name )..