Greetings, codrades. I got a strange error while solving the problem, link: https://leetcode.com/problems/remove-element/
Before I submit code, I always check it in IDLEs. Usually I use Pychram CE. And that's first time I ever saw how output data differs in other environments.
Pls, help me to figure out why does this happening, and what code should be look like.
The code is below:
def removeElement(nums, val):
numbers = []
for i in range(len(nums)):
if val != nums[i]:
numbers.append(nums[i])
print(numbers)
#return numbers. <-- I don't use it due to, idk why, it doesn't print the list in a console.
thelist = [3, 2, 2, 3]
removeElement(thelist, 3)PyCharm prints out [2, 2], while leetCode [3, 2]. Pls if you had such a problem, I'd be glad get help from you guys!
As a proof, here are screenshots:


print("Thanks for Help! :)")