lst = [1,2,4,3,5]
for x in lst:
    if x % 2 == 0:
        lst.remove(x)
print(lst)

# create a shallow copy of the list
for x in lst[:]:
    if x % 2 == 0:
        lst.remove(x)
print(lst)

s = 'beautiful'
for ch in s:
    if ch in "aeiou":
        s = s.replace(ch, '')
print(s)
ac3abe2518f838e05c02ddca7fe38794db66ba0f
<mask token>

<mask token>
for x in lst:
    if x % 2 == 0:
        lst.remove(x)
print(lst)
for x in lst[:]:
    if x % 2 == 0:
        lst.remove(x)
print(lst)
<mask token>
for ch in s:
    if ch in 'aeiou':
        s = s.replace(ch, '')
print(s)

lst = [1, 2, 4, 3, 5]
for x in lst:
    if x % 2 == 0:
        lst.remove(x)
print(lst)
for x in lst[:]:
    if x % 2 == 0:
        lst.remove(x)
print(lst)
s = 'beautiful'
for ch in s:
    if ch in 'aeiou':
        s = s.replace(ch, '')
print(s)

lst = [1,2,4,3,5]
for x in lst:
    if x % 2 == 0:
        lst.remove(x)
print(lst)

# create a shallow copy of the list
for x in lst[:]:
    if x % 2 == 0:
        lst.remove(x)
print(lst)

s = 'beautiful'
for ch in s:
    if ch in "aeiou":
        s = s.replace(ch, '')
print(s)