#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목step11질문2020-01-06 18:13
작성자

num='{}'.format(i*j)
        new.append(num.center(5))
['  1  ', '  2  ', '  3  ', '  4  ', '  5  ', '  6  ', '  7  ', '  8  ', '  9  ']

num={}.format(i*j) 
        new.append(num.center(5))
(X)
 

왜 {}에 ''가 감싸져 있는 첫 번째는 오류가 나지 않지만  두번째는 오류가 나는 이유가 무엇일까요?

  num=str({}.format(i*j))
        new.append(num.center(5))

가 안되는 이유는 무엇인가요?

댓글
이전writerow함수 질문드립니다ㅠㅠ2020-01-07
다음리스트 aliasing질문2020-01-06