Make it work on python3

Could you also move the convertion to list directly to the variable initialilzation above?