the code should do this but it is still printing some without 4 letters
def friend(x):
global a
a = 0
global friends
for friends in x:
global b
b = 0
for letter in x[a]:
b += 1
if b != 4:
x.remove(x[a])
if b == 4:
a += 1
print(x)
ab = ["jim", "john", "jack", "jeff", "fuasadfa", "fgadkljbg"]
friend(ab)