강의

멘토링

커뮤니티

Inflearn Community Q&A

j77330191482's profile image
j77330191482

asked

Getting Started with Programming: Introduction to Python (Inflearn Original)

for statement (2-3)

줄바꿈이 되지 않는 이유가 뭔가요?

Written on

·

530

0

Visual Studio Code로 연습하고 있습니다.

구구단 줄바꿈이 되지 않는 이유를 알 수 없습니다.

for i in range(2, 10):
    for j in range(1, 10):
        print('{:4d}'.format(i *j), end = '')

python

Answer 2

0

j77330191482님의 프로필 이미지
j77330191482
Questioner

제가 강의내용을 제대로 보지 못했네요.

신속한 답변 감사합니다.

0

niceman님의 프로필 이미지
niceman
Instructor

안녕하세요.

print 문에 end 옵션이 있을 경우 스트링이 연결 후 출력됩니다.

바로 아래에 print() 등으로 강제로 줄바꿈 하실 수 있어요.

j77330191482's profile image
j77330191482

asked

Ask a question