New submission from chirag maliwal <chiragmaliwal1...@gmail.com>:

a = [1,1,1,1]

for i in a:
    if a.count(i) > 1:
        a.remove(i)
 
print(a)


"""
Output:
[1,1]


expected:
[1]
"""

----------
files: test.py
messages: 370239
nosy: cmaliwal
priority: normal
severity: normal
status: open
title: list.Count() isn't working as expected for the series of same numbers in 
a list
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file49200/test.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40809>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to