Python, for i in list, for i in str

my_list = ["a", "pp", "l", "e"]
my_str = "apple"
 
for i in my_list:
    print(i)
#a
#pp
#l
#e

for i in my_str:
    print(i)
#a
#p
#p
#l
#e

댓글

이 블로그의 인기 게시물

<배당주 투자> 배당주(은행) '22년 8월

은행주 - 배당주 투자 일기, 2022.07.04(월)

<배당주 투자> 지주사, '22년 8월