[Python] List (Array) Data Structure
List is a data structure like Array. Elements in the List can be duplicated. Creating List ### [] method emptyList = [] weekdayList = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'] nameList = ['Kim', 'Lee', 'Park', 'Kim'] ### list() function emptyList = list() testList = list('cat') # from String print(testList) # ['c', 'a', 't'] testTuple = ('red', 'green', 'blue') testList = list(testTuple) # from Tuple ..
2020. 12. 7.