Created
March 24, 2018 22:12
-
-
Save simplesasha/6e2c676bd39c204e41634d020cab112e to your computer and use it in GitHub Desktop.
Python lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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