I'm just study Python and fall in very stupid situation
This code every time have different results, looks like if range() returns random result in range:
This code every time have different results, looks like if range() returns random result in range:
l = {str(i)+str(i-1) for i in range(20)} print(l)
Output:================= RESTART: D:\My Files\Documents\Python\new.py =================
{'10', '1817', '32', '109', '43', '76', '1413', '1110', '21', '1514', '65', '1716', '1918', '87', '1211', '54', '1312', '98', '0-1', '1615'}
>>>
================= RESTART: D:\My Files\Documents\Python\new.py =================
{'65', '98', '1817', '1716', '1211', '10', '109', '1312', '76', '21', '87', '1110', '1918', '1413', '54', '1514', '43', '32', '0-1', '1615'}
>>>
================= RESTART: D:\My Files\Documents\Python\new.py =================
{'1312', '76', '0-1', '98', '65', '1918', '1413', '21', '1817', '32', '87', '1110', '43', '1615', '1716', '109', '1211', '1514', '54', '10'}
>>>
================= RESTART: D:\My Files\Documents\Python\new.py =================
{'1312', '87', '54', '21', '1211', '1716', '1918', '1514', '76', '43', '109', '1413', '0-1', '65', '1110', '1817', '32', '98', '1615', '10'}
>>>