Python文字列変換strとintの相互回転
文字列strをint:
int文字列strに変換:
unicode -> int:
str -> unicode:
unicode -> str:
int -> str:
str -> int:
int_value = int(str_value)
に変換int文字列strに変換:
str_value = str(int_value)
int -> unicode: unicode(int_value)
unicode -> int:
int(unicode_value)
str -> unicode:
unicode(str_value)
unicode -> str:
str(unicode_value)
int -> str:
str(int_value)
str -> int:
int(str_value)