문제 Consider a list (list = []). You can perform the following commands: 1.insert i e: Insert integer at position . 2.print: Print the list. 3.remove e: Delete the first occurrence of integer . 4.append e: Insert integer at the end of the list. 5.sort: Sort the list. 6.pop: Pop the last element from the list. 7.reverse: Reverse the list.
풀이 if __name__ == '__main__': N = int(input()) l = [] for i in range (N): cmd = input() if cmd.split(' ')[0] == 'insert': l.insert(int(cmd.split(' ')[1]), int(cm...
원문 링크 : 해커랭크 Practice Python Lists