TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'


TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'

보통 print 문을 이용하여 서식데이터를 출력할때 많이 접하는 오류입니다. print문의 괄호의 위치가 잘못됬거나 괄호로 묶어줘야 하는데 묶어주지 않았을때 많이 발생합니다. 아래의 예시처럼요.>>> a=3>>> b=4>>> print ("%d is %d")%(a,b)Traceback (most recent call last):File "<stdin>", line 1, in <module>TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'위의 print 문을 print("%d is %d"%(a,b)) 이렇게 바꾸어 주어 오류를 해결합니다....



원문링크 : TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'