0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

リストすべてをstr型からint型を相互に変換する方法

Posted at

Map関数を使う

map関数とはリストないすべての要素に関数を適用するというものである。

例えば list1[ '1', '1', '1', '1']というリストが有った場合
list1 = map(int , list1)をすることですべて整数型にすることができる。
もちろん逆も同じようにすれば簡単にできる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?