<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>owiewowe</author_name>
  <author_url>https://blog.hatena.ne.jp/owiewowe/</author_url>
  <blog_title>19日に更新してた</blog_title>
  <blog_url>https://owiewowe.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>ネタが無いので一応書き留めとこうかと。 # a=[1, 0] でも同じ結果が戻ってきます。 a=[True, False] # True, False で戻って欲しいなら [not i for i in a] #[bool(abs(i-1)) for i in a], [bool(i-1) for i in a] &gt;&gt;[False, True] # 0,1 がいいなら [int(not i) for i in a] #[abs(i-1) for i in a] &gt;&gt;[0, 1] numpy なら import numpy as np # a=[1, 0] でも np.array でも同じ結果が…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fowiewowe.hatenablog.com%2Fentry%2F2022%2F06%2F19%2F100000&quot; title=&quot;python でbool 値のリスト を反転させる - 19日に更新してた&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-06-19 10:00:00</published>
  <title>python でbool 値のリスト を反転させる</title>
  <type>rich</type>
  <url>https://owiewowe.hatenablog.com/entry/2022/06/19/100000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
