a = 10 + 20 print(a) print(10-4) print(130*132) print(100/32) print(10%3) b = 300 print(b+10) print(10//3) print(10**3) str1 = "안녕" str2 = "하세요" print(str1 + str2) print(str1 * 3) list = [10, 30, 55, 7, 86] print(list[1]) #인덱싱 print(list[1:4]) #슬라이싱 list[1] = 20 #원소를 바꿔치기 print(list[1]) print(list) #리스트 전체 출력 str3 = "hellopython" print(str3[5]) print(str3[0:5]) animal = ['토끼', '사자', '바나나', '원숭이'] animal[2] = '호랑이' print(animal[2]) print(animal)
To embed this project on your website, copy the following code and paste it into your website's HTML: