On 2019-09-13 20:17, CrazyVideoGamez wrote:
For some reason, if you put in the code
def odd_ones_out(numbers):
for num in numbers:
count = numbers.count(num)
if not count % 2 == 0:
for i in range(count):
numbers.remove(num)
return numbers
gt; nums = [72, 4, 82, 67, 67]
>>> odd_ones_out(nums)
[4, 67, 67]
>>> nums
[4, 67, 67]
>>>
-Original Message-
From: Python-list On Behalf Of CrazyVideoGamez
Sent: Friday, September 13, 2019 3:18 PM
To: python-list@python.org
Subject: Weird Python Bug
For some
For some reason, if you put in the code
def odd_ones_out(numbers):
for num in numbers:
count = numbers.count(num)
if not count % 2 == 0:
for i in range(count):
numbers.remove(num)
return numbers
nums = [72, 4, 82, 67, 67]
print(odd_ones_out(nums
On Thursday 24 September 2009 02:01:52 pm Christian Heimes wrote:
> Sampsa Riikonen wrote:
> > => If I start the program in directory "paska2", everythings OK, but if
> > the directory name happens to be "python", the importation of the modules
> > goes nuts!
>
> What's inside the python/ subdirect
Sampsa Riikonen wrote:
> => If I start the program in directory "paska2", everythings OK, but if the
> directory name happens to be "python", the importation of the modules goes
> nuts!
What's inside the python/ subdirectory? Do you happen to have a file
called struct.py inside it?
--
http://ma
Dear List,
Maybe someone could help out with this mysterious bug..
starting a python program in a directory named "python", makes
the importation of modules sometimes impossible with cryptic
error messages..
sam...@linux-912g:~> mkdir paska2
sam...@linux-912g:~>
sam...@linux-912g:~> echo "import