string convert Upper and use set method

  Kiến thức lập trình

I have a question
A = input()
B = list(set(A.upper()))
print(B)

I entered A : Baaaa
and i guessed B : [‘B’,’A’]
But Pycharm print B : [‘A’, ‘B’]

Why is it wrong
I know, set function make delete duplication
And list function just print

is it wrong?

New contributor

심성호 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT