I have 2 lists. One of the is includes string and the other one includes integers. I would like to add two of them to a set, print them in order. But when I try to do so, the set prints randomly in the console. How can I solve this problem? Here are my arrays,
['#', '*']
[2, 3, 5, 6, 8]
['o', '€']
Expected result :
{'#', '*', 2, 3, 5, 6, 8, 'o', '€'}
But in reality, elements of the set always changes. It never ordered like set updating order. Also, I am using set_x.update(arr_x)
method to do that.
NOTE: I want to solve this problem without external libs and functions.