Desc :
Source Code :
print('Hello Python')
print("Hello Python")
print("""Hello Python""")
print('''Hello Python''')
print('T','E','S','T',sep='')
print('2021','04','13',sep='-')
print('niceman','google.com',sep='@')
print('Welcome To',end=' ')
print('the black parade',end=' ') # 줄바꿈하지않음
print(' piano notes')
print('{} and {}'.format('You','Me'))
print()
print("{0} and {1} and {0}".format('You','Me'))
print("{a} and {b}".format(a='You',b='Me'))
print("%s's favorite number is %d"%('Park',7)) #정확한 코딩
print("Test1: %5d, Price: %4.2f"%(776, 6534.123))
print("Test1: {0: 5d}, Price:{1: 4.2f}".format(776,6534.123))
print("Test1: {a:5d}, Price:{b: 4.2f}".format(a=776, b=6534.123))
# Escape 코드
print('you"')
print('\'')
print("'you'")
print("\\you\\")
print('\t\t\t\tyou')
Result :
'Python' 카테고리의 다른 글
if, while, for (0) | 2021.04.18 |
---|---|
리스트, 튜플, 딕셔너리, 셋 (0) | 2021.04.18 |
python 문자열 및 연산 (0) | 2021.04.18 |
math 모듈 (0) | 2021.04.18 |
Python 가상환경 (0) | 2021.04.16 |