python concatenate static text with variable -


I am trying to insert static text with a variable. No points are printed without variable but when I try to add static text to it, I do not get any output. Even I have such a distance, how can any idea be fixed?

  For tweets in status: singletweet = 'URL' + tweet. GetId () Print singletweet    

what print type (tweets GetId () ) What do you say? I'm not sure why you are not getting a traceback - maybe a higher level is catching it and throwing it.

If this is not a string, then you have to convert it to one

  singletweet = 'URL' + str (tweet.GetId ())  < / Pre> 

or

  singletweet = 'url% s'%. Tweet.GetId () # for Python2.5 or older   

or

  singletweet = 'URL {id}' Format (id = tweet. GETId ()) for # Python 2.6 or newer    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -