TypeError: object of type ‘int’ has no len() – Python/Pygame

If you just want the value of self.cookie_count, you can just use

self.draw_text('Cookies: {}'.format(self.cookie_count)

The len() function returns the number of items in an object such as an array and does not work on an int object.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)