num is an integer, and list() expects an iterable, hence the error. Did you want to obtain a list of integers representing the digits of num? If so you can try using map():
l = map(int, string)
solved TypeError: ‘int’ object is not iterable; Python 2.7