방법 1: python2 및 python3에 적용 가능>>> from collections import Iterable >>> isinstance("str", Iterable) True로그인 후 복사방법 2: python3에 적용 가능s = "hello world" hasattr(s, "__iter__")로그인 후 복사 [python][기초]에 관한 더 많은 글은 변수가 반복 가능한지 판단하는 방법은 PHP 중국어 홈페이지를 참고해주세요!