# 3 ways to remove last element from list python
# program to delete the last
# last element from the list
#using pop method
list = [1,2,3,4,5]
print("Original list: " +str(list))
# call the pop function
# ele stores the element
#popped (5 in this case)
ele= list.pop()
# print the updated list
print("Updated list: " +str(list))
# slice the list
# from index 0 to -1
list = list[ : -1]
# print the updated list
print("Updated list: " +str(list))
# call del operator
del list[-1]
# print the updated list
print("Updated list: " +str(list))
from time import time
q = input('What do you want to type? ')
a = ' '
record = []
while a != '':
start = time()
a = input('Type: ')
end = time()
v = end-start
record.append(v)
if a == q:
print('Time taken to type name: {:.2f}'.format(v))
else:
break
for i in record:
print('{:.2f} seconds.'.format(i))