a = 'apple'
print(a[3])
#인덱싱
b = ['b','a','n','a','n','a']
print(b[2:6]) #인덱스 2이상 6미만인 원소를 가지고 오라는 뜻
#슬라이싱
print(b[-2]) #마이너스 2는 뒤에서 두 번째 원소를 가져오라는 뜻
print(b[:3]) #맨 처음부터 3미만인 원소를 슬라이싱하라는 뜻
print(b[:]) #모든 인덱스를 가져오라는 뜻
bag1=['은','은','은','은','은','은','금','금','다이아몬드','금']
jewel1 = bag1[-2]
jewel2 = bag1[0:6]
print(jewel1)
print(jewel2)
#멤버 조회하기
c="coding"
print('a' in c)
print('o' in c)
#길이 확인하기
print(len(a))
print(len(b))
len(c) #길이를 확인 할 수 있는 명령어
my_list = ['Apple', 'Banana', 'Cherry', 'Durian']
print('Egg' in my_list)

Embed on website

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