print('-----자료형 변환-----')
num1 = 13
num1 = str(num1)
print(type(num1))

print('-------------')
a = '345'
print(type(a))

b = int('345')
print(type(b))

print('-----3/17-----')
print(int('5')) #문자->숫자(정수)
print(float("3.14")) #문자->숫자(실수)
print(str(5)) #숫자->문자
print(type(str(5))) 
print(list('apple')) #문자->리스트

print('-----------')
x = 4
y = '13'
y = int(y)
print(x + y)
print(type(x + y))

print('-----예제-----')
str1 = '안녕하세요'
str1 = list(str1)
print(str1)
print(str1[1])

'''
'안녕하세요' 라는 문자열을
리스트로 변환하고, 
'녕' 이라는 글자를 
리스트의 인덱스를 통해서
출력해봅시다

str1 = '안녕하세요'
안녕하세요를 리스트로 바꾸기
인덱스를 이용해서 녕 을 출력하기
'''

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: