Skip to content

(이*현 , 강의노트9장) #126

@lgh182600-lang

Description

@lgh182600-lang
print(f'{"Menu":<8}{"Price":>5}')
print(f'{"Latte":<8}{2000:>5}')

이 코드를 실행했을 때

Menu    Price 
Latte    2000

이렇게 값이 출력되는데 왜 Price 뒤에 공백이 하나 붙어서 출력되는지 궁금합니다.
Price가 5글자이고 너비도 >5로 설정했으니 이론상 글자 뒤에 공백이 없어야 한다고 생각하는데 출력 결과를 드래그 해 보면 Price 뒤에 공백이 한 칸 포함되어 보이는 이유가 궁금합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions