def that_can_find_the_following(strings):
help = 0
lp = 0
largest = ''
smallest = strings[0]
three_smallest = []
lo = ''
for i in strings:
if i[:4] == 'Help':
help += 1
if 'lp' in i:
lp += 1
if len(i) > len(largest):
largest = i
if 'lo' in i and len(lo) > 9:
lo = i
for x in range(3):
for z in strings:
if len(z) < len(smallest):
smallest = z
strings.pop(z)
three_smallest.append(smallest)
smallest = strings[0]
print('Help ' + help)
print('lp ' + lp)
print('largest ' + largest)
print(' 3 smallest ' + three_smallest[0] + three_smallest[1] + three_smallest[2])
print('lo '+lo)
Comments
Leave a comment