string_to_sort = 'Sorting1234'
l = list(string_to_sort)
uppers = numbers = lowers = list() # this is the trouble, but dont know why
for char in l:
if char.isupper():
print("it's upper: " + char)
uppers.append(char)
elif char.islower():
print("it's lower " + char)
lowers.append(char)
elif char.isdigit():
print("it's digit: " + char)
numbers.append(char)
print(uppers)
print(lowers)
print(numbers)
the 3 lists all have same content, but when I init-d the lists , I just made them empty, not related to each other. What's the reason all 3 lists get same content?