본문 바로가기
파이썬

파이썬 소스코드: 다양한 문자열(String)

by 드린 2016. 10. 2.

목차

    반응형
    food1="Python's favorite food is perl"
    say1='"Python is very easy." he says.'
    food2='Python\'s favorite food is perl'
    say2="\"Python is very easy.\" he says."
    multiline1="Life is too short\nYou need python"
    multiline2="""Life is too short
    You need python"""

    print(food1)
    print(say1)
    print(food2)
    print(say2)
    print(multiline1)
    print(multiline2)

    <결과>

    Python's favorite food is perl "Python is very easy." he says. Python's favorite food is perl "Python is very easy." he says. Life is too short You need python Life is too short You need python


    2016/09/29 - [파이썬] - 파이썬 소스코드: 임의의 데이터 배열 누적 합계 구하기(for)

    2016/09/29 - [파이썬] - 파이썬 소스코드: 1~100 누적 합계 구하기(while)

    2016/09/29 - [파이썬] - 파이썬 소스코드: 1~100 누적 합계 구하기(for)

    #파이썬 #파이썬 소스코드 #String #다양한 String #문자열

    반응형