Skip to content

Instantly share code, notes, and snippets.

@yunho0130
Created January 2, 2017 01:14
Show Gist options
  • Save yunho0130/33e1b6e60ddbc1d44c1212f3d5fe7140 to your computer and use it in GitHub Desktop.
Save yunho0130/33e1b6e60ddbc1d44c1212f3d5fe7140 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 02 09:56:58 2017
@author: Yunho
"""
temp_list = ['사과', '배', '딸기']
print temp_list
#for i in temp_list:
# print i
# append
temp_list.append('포도')
for i in temp_list:
print i
# .sort()
temp_list.sort()
for i in temp_list:
print i
# del
del temp_list[2]
print "=="*6
for i in temp_list:
print i
# mutable
temp_list[1] = '감'
print "=="*6
for i in temp_list:
print i
another_list = temp_list
another_list[0] = '초콜릿'
print "=="*6
for i in temp_list:
print i
list2 = temp_list[:]
print "=="*6
for i in list2:
print i
list2[0] = '자전거'
print "=="*6
for i in temp_list:
print i
print "=="*6
for i in list2:
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment