python - Extract the list of unique numbers out of a string of numbers -


  डीईफ़ अनूठा (ए): i के लिए: सेट (ए) सेट ([1,2,3 ])   

प्रिंट अद्वितीय ([1,1,2,3,2])

एक समारोह को परिभाषित अद्वितीय (ए) जो नंबरों की एक सूची लेता है और एक नई सूची देता है जहां का प्रत्येक तत्व केवल एक बार होता है नई सूची में इसके तत्वों को उसी क्रम में होना चाहिए क्योंकि वे एक में दिखाई देते हैं। आपके फ़ंक्शन को एक सेट का उपयोग करना चाहिए।

वह है जिसे आप चाहते हैं:

  & gt; & gt; & gt; A = [1,1,2,2,3,3] & gt; & gt; & gt; सेट (ए) सेट ([1, 2, 3])    

Comments

Popular posts from this blog

Out of index C/C++ -

algorithm - Graph cut with python: How to set up the graph correctly? -

objective c - how Set autolayout for multiple dynamic buttons and labells in iOS? -