랭귀지/python
int 아닐때 0 반환
유키공
2024. 10. 23. 15:57
result = int(value) if isinstance(value, int) or (isinstance(value, str) and value.isdigit()) else 0