''''
Array(other programs) = List(Python)
* (LIST) size free
* (LIST) lots of functions
create a list by: name = [] -> can input data within [] (ex. name = [111, 343])
examples: used "data" as name for the list.
n = data itself / o = order of data in the list
append putting data into the list/ one at a time only
sort data.sort() => sorts in order/ works on both alphabet, numbers
count data.count(n) => how many of n is in the list?
pop data.pop(o) == deletes last data/ deletes by list order = (1) is 2nd data
extend data.extend(another list) => adds another list data into current list, no integers
clear data.clear() => clears the list
remove data.remove(n) => quite literally removes n from list/ not order-based but actual data-based
index data.index(n) => searches for earliest n in the list/ data.index(n, o) => searches for n from m (for 중복 cases)/ data.index(n,o1,o2) => searches for n from m to o
insert data.insert(o, n) => inserts n before data of o's order
reverse data.sort(reverse=True) => sorts list but reverse order
'''
data = []
print(data, type(data))
data.append(10)
data.append(20)
data.append(30)
print(data, type(data))
data.pop() # default: last number of the list
print(data, type(data))
data.pop(1) # number within parenthesis = list order. this case = 1st = 10
print(data, type(data))
data.append(10)
data.append(50)
data.append(30)
print(data, type(data))
data.sort()
print(data, type(data))
data.sort(reverse=True)
print(data, type(data))
print(data.count(10))
more = [2007, 34343]
examples = 3
data.extend(more)
print(data, type(data))
data.remove(2007)
print(data, type(data))
data.append(20)
data.append(10)
data.append(3034)
data.insert(2, 100)
print(data)
print('index', data.index(10))
data.insert(0, 1301239)
print(data)
print('%.2f'%(blahblah)) = print blahblah to 2 decimal places
ord - 문자를 숫자로
chr - 숫자를 문자로