티스토리 뷰

공부

[Python] typeof -> `isinstance(s, str)`

seunggabi 승가비 2021. 1. 14. 06:50
728x90
isinstance(s, str)

https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string

 

How to check if type of a variable is string?

Is there a way to check if the type of a variable in python is a string, like: isinstance(x,int); for integer values?

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[PHP] join -> implode; split -> explode  (0) 2021.01.14
[PHP] str_replace("a", "b" "abc") -> "bbc"  (0) 2021.01.14
[Python] typeof -> `isinstance(s, str)`  (0) 2021.01.14
[Python] url to image  (0) 2021.01.14
Date format day `EEE` or `EEEE`  (0) 2021.01.14
[Python] for by date  (0) 2021.01.09
댓글
댓글쓰기 폼