컨테이너란?
기본사용법
Python
1 2 3 4 5 6 7 8 9 10 | print ( type ( 'egoing' )) #<class 'str'> name = 'egoing' print (name) #egoing print ( type ([ 'egoing' , 'leezche' , 'graphittie' ])) #<class 'list'> names = [ 'egoing' , 'leezche' , 'graphittie' ] print (names) print (names[ 2 ]) #graphittie egoing = [ 'programmer' , 'seoul' , 25 , False ] egoing[ 1 ] = 'busan' print (egoing) #['programmer', 'busan', 25, False] |
Ruby
1 2 3 4 5 | names = [ 'egoing' , 'leezche' , 'graphittie' ] puts(names. class ) # Array puts(names[ 0 ]) # egoing names[ 0 ] = 'k8805' print(names) # ["k8805", "leezche", "graphittie"] |