I am new to python and things are little why's and how's. Just got to know "SETS" in python and I seem can't print it out the same order as I declare it. my code:
myPersonels = {"Haime", "Brian", "Ryan", "Jonathan", "Patrick", "Robert",
"Renzo", "Rjay", "Daniel", "Angelo"}
print(myPersonels)
output:
{'Rjay', 'Daniel', 'Jonathan', 'Robert', 'Ryan', 'Renzo', 'Brian', 'Haime',
'Angelo', 'Patrick'}
I tried the sorted() method but it gives me the alphabetically order and that's not what I want. I want it to print the same order as I declare it. How can I do that? Any help will be much appreciated thanks.