์ ๋ต : 3๋ฒ (.islower ์ ๋ฌธ์๊ฐ ์๋ฌธ์์ธ์ง ์ฌ๋ถ๋ฅผ ๋ฐํํ๋ ํจ์๋ช )
์ ๋ต : 2๋ฒ
#3 ๋ค์๊ณผ ๊ฐ์ด ์ฝ๋๋ฅผ ์์ฑํ์ ๋, ์คํ ๊ฒฐ๊ณผ๋ก ์๋ง์ ๊ฒ์?
์ ๋ต : 2๋ฒ(firstjword๋ secondjword๊ฐ first_word์ second_word๋ก ๊ฐ์ ํ์ ๋)
#4 sentence ๋ฌธ์์ด์ ์ฌ์ฉํ์ฌ ๋ค์ํ ํํ๋ก ์๋ก์ด ๋ฌธ์์ด์ ์์ฑํ์๋ค. ์ด ์ค ๊ธฐ์กด ๋ฌธ์ ์ด sentence์ ๊ฒฐ๊ณผ๊ฐ์ด ๊ฐ์ ๊ฒ์ ๋ฌด์์ธ๊ฐ?
sentence = 'Life Is Short You Need Python'
a = sentence[-15:20]
b = sentence.lower()
c = sentence[๏ผ20]
d = sentence[0๏ผ]
e = sentence[๏ผ-l]
1. a 2.b 3.c 4.d 5. e
์ ๋ต : 4๋ฒ d
์ ๋ต : 1๋ฒ
1) 5.0 2) 0 3)์๋ฌ ๋ฐ์ 4) 10.0 5) 25.0
์ ๋ต : 5๋ฒ
date = '2020-05-01'
date_tuple=tuple(date.split('-'))
print(date_tuple)
print('์ฐ๋ :{0},์ :{1},์ผ :{2}'.format(*date_tuple))
์ ๋ต : 1๋ฒ
'๐ ์คํฐ๋ > ํ์ด์ฌ ์คํฐ๋ ๊ณผ์ ์ ์ถ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[4ํ/๊น์ค] 6์ฐจ์ ํ์ด์ฌ ๊ณผ์ - ๋ฌธ์์ด (0) | 2023.05.09 |
---|---|
[4ํ/๊น์ค] 5์ฐจ์ ํ์ด์ฌ ๊ณผ์ - ํจ์ (0) | 2023.05.09 |
[4ํ / ๊น์ ๊ฒฝ] 5์ฐจ์ ํ์ด์ฌ ๊ณผ์ - ํจ์ํ (0) | 2023.04.13 |
[3ํ / ๊น์์] 5์ฐจ์ ํ์ด์ฌ ๊ณผ์ - ํจ์ํ (0) | 2023.04.12 |
[2ํ/์ด์ ์ง] 5์ฐจ์ ํ์ด์ฌ ๊ณผ์ - ํจ์ (0) | 2023.04.12 |