I would write a little function to check if a string in a list, and when yes, the string should remove out of the List.
this is my code
def str_clearer(L):
for i in L:
if i == str:
L.remove(i)
else:
pass
print(L)
return L
L = [1, 2, 3, "hallo", "4", 3.3]
str_clearer(L)
assert str_clearer(L) == [1, 2, 3, 3.3]
but it make nothing with the List.
if i make it so that it make a new List with all int or float, he make same nothing.