본문 바로가기

Python_Matter/Solve

Python Learn the basics Quiz 7

반응형

Q>

(1, 2, 3)이라는 튜플에 (4, 5)라는 값을 추가하여 (1, 2, 3, 4, 5)로 구성된 새로운 튜플을 만들어 출력하시오.


A>

tuple_1 = (1, 2, 3)
tuple_2 = (4, 5)

print(tuple_1 + tuple_2)


O>

(1, 2, 3, 4, 5)


Process finished with exit code 0


반응형

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

Python Learn the basics Quiz 9  (0) 2019.03.16
Python Learn the basics Quiz 8  (0) 2019.03.16
Python Learn the basics Quiz 6  (0) 2019.03.16
Python Learn the basics Quiz 5  (0) 2019.03.16
Python Learn the basics Quiz 4  (0) 2019.03.16