본문 바로가기

Python_Matter/Solve

Python Learn the basics Quiz 6

반응형

Q>

1. ['Life', 'is', 'too', 'short']라는 리스트를 'Life is too short'라는 문자열로 결합하시오.

2. 결합된 문자열의 모든 글자를 대문자 형태로 출력하시오.


A>

list_str = ['Life', 'is', 'too', 'short']
print(' '.join(list_str))
print(' '.join(list_str).upper())


O>

Life is too short

LIFE IS TOO SHORT


Process finished with exit code 0



반응형

'Python_Matter > Solve' 카테고리의 다른 글

Python Learn the basics Quiz 8  (0) 2019.03.16
Python Learn the basics Quiz 7  (0) 2019.03.16
Python Learn the basics Quiz 5  (0) 2019.03.16
Python Learn the basics Quiz 4  (0) 2019.03.16
Python Learn the basics Quiz 3  (0) 2019.03.16