🖥
Example of deleting specific value from array of # python (I want to s
<h1> python </h1>
<p> It seems to be easy to handle once it is set = set. It is unclear whether it is a good way. </p>
<pre> <code class="py">>>> list(set(["a","b","c","d","e"]) - set(["b","d"]))
['a', 'e', 'c']
</code> </pre>
<h1> ruby </h1>
<p> You can subtract with the array.
<code>rb
[1] pry(main)> ["a","b","c","d","e"] - ["b", "d"]
=> ["a", "c", "e"]
</code> </p>
<h1> ref </h1>
<p> <a href="https://qiita.com/Tocyuki/items/0bc783daab382ef7a0ec">Python set operations-Qiita</a> </p>
Original by Github issue
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2019-04-12
Discussion