programming/Python

str() , int()

I s a a c 2020. 6. 12. 22:18
728x90
반응형
my_int = 1

float(my_int)
print(float(my_int))

1.0

str(my_int)
print(str(my_int))

1

type(str(my_int))
print(type(str(my_int)))

<class 'str'>

my_str = "coding"
list(my_str)
print(list(my_str))

['c', 'o', 'd', 'i', 'n', 'g']
728x90
반응형