I am manipulating a string to return just a number within the string. The basic code below
partition_tuple_se = searchterm.rpartition('S')
partition_tuple_sea = partition_tuple_se[2].rpartition('E')
season = partition_tuple_sea[0]
print season
When I print it comes out as a number 9. As soon as I use the variable season in an API call
t = tvdb_api.Tvdb()
episode = t[name][season][14]
print episode['overview']
it returns as ‘9’ which breaks the API call because it expects 9. How to I get around this?
Pass it to the
intconstructor.