반응형
# variable binding a memory of has some value.
interset1 = "삼성전자"
interset2 = "LG전자"
interset3 = "네이버"
interset4 = "카카오"
# printing value of memory using by call variable
print(interset1)
print(interset2)
print(interset3)
print(interset4)
# using list structure for binding a lot of value
interset = ["삼성전자", "LG전자", "네이버", "카카오"]
print(interset)
# list is easy handle sequence data
woowa = [9130, 9150, 9150, 9300, 9400]
# difference type biding as list
mystock = ['Naver', 5000]
print(mystock)
# create empty list object
empty = []
print(empty)
실행 결과
$ py list_generate.py
삼성전자
LG전자
네이버
카카오
['삼성전자', 'LG전자', '네이버', '카카오']
['Naver', 5000]
[]
반응형
'Programming > Python' 카테고리의 다른 글
[Python-Basic] List Data Type - 4 (Remove) (0) | 2019.11.05 |
---|---|
[Python-Basic] List Data Type - 3 (Index) (0) | 2019.11.05 |
[Python-Basic] List Data Type - 1(Add) (0) | 2019.11.05 |
[Python-Basic] Dictionary Data Type - 3 (0) | 2019.11.05 |
[Python-Basic] Dictionary Data Type - 2 (0) | 2019.11.05 |