Skip to content

Instantly share code, notes, and snippets.

View LeeChanHyuk's full-sized avatar

LeeChanHyuk LeeChanHyuk

View GitHub Profile
@LeeChanHyuk
LeeChanHyuk / algorithm.py
Created March 25, 2019 08:48
backjoon 10866 - deck(Python)
my_list1=[]
num=int(input())
def function(a,b=1):
if(a=="push_front"):
my_list1.insert(0,b)
elif(a=="push_back"):
my_list1.insert(my_list1.__len__(),b)
elif(a=="pop_front"):
if(my_list1.__len__()!=0):
print(my_list1[0])