Convert Unicode data to int in python

The Solution to Convert Unicode data to int in python is


int(limit) returns the value converted into an integer, and doesn't change it in place as you call the function (which is what you are expecting it to).

Do this instead:

limit = int(limit)

Or when definiting limit:

if 'limit' in user_data :
    limit = int(user_data['limit'])

~ Answered on 2013-05-10 06:34:30


Most Viewed Questions: