#accumulator pattern
# input is a list of names; output is list of short (<= 5 characters) names
# for example,
# names = ["Jonathan","Hien","Raj","Jinash","Lasya"]
# output = ["Hien","Raj","Lasya"]
def remove_long_names(names):
result = []
for name in names:
if len(name) <= 5:
result.append(name)
return result
remove_long_names(["Jonathan","Hien","Raj","Jinash","Lasya"])
['Hien', 'Raj', 'Lasya']
"09.30AM:09.45AM:220".split(":")
['09.30AM', '09.45AM', '220']
"09.30aM".split(".")
['09', '30aM']
"09.30AM".lower()
'09.30am'
570 // 60
9
570 % 60
30