python tuple 모듈 작업

원본 링크:http://www.cnblogs.com/JcHome/p/10089731.html
python tuple      

        ,                ,            

tuple()  ,        
list_a=["a","b","c","abc"]
str_a="python"
print tuple(list_a)   #        
print tuple(str_a)    #         

    :
('a', 'b', 'c', 'abc')
('p', 'y', 't', 'h', 'o', 'n')


        
color=('Red' ,'green', 'blue', 'black' ,'white')
print color[2]   #              

    :
blue

  
다음으로 전송:https://www.cnblogs.com/JcHome/p/10089731.html

좋은 웹페이지 즐겨찾기