Created
April 7, 2021 23:36
-
-
Save kanekomasahiro/22fd1bb18ad5e31ad74a8b0ec0a13b00 to your computer and use it in GitHub Desktop.
stringタイプで記述されたリストや辞書をリストや辞書タイプに変換する.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ast import literal_eval | |
s = '[1, 2, 3, 4]' | |
l = literal_eval(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment