Skip to content

Instantly share code, notes, and snippets.

@simplesasha
Created March 24, 2018 22:12
Show Gist options
  • Save simplesasha/6e2c676bd39c204e41634d020cab112e to your computer and use it in GitHub Desktop.
Save simplesasha/6e2c676bd39c204e41634d020cab112e to your computer and use it in GitHub Desktop.
Python lists
list = [1, 2, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9]
counter = 1
print('Введите число которое необходимо удалить: ', list)
num = int(input())
while True:
if num in list:
list.remove(num)
print('Удалено элементов: ', counter)
counter = counter + 1
else:
print('Операция завершена, список оставшихся чисел: ', list)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment