如果您以这种方式破坏行首,则空格将成为字符串的一部分。
尝试这个:
header, response = client.request( 'https://api.twitter.com/1.1/statuses/user_timeline.' 'json?include_entities=true&screen_name=' + username + '&count=1')
字符串将自动连接。

如果您以这种方式破坏行首,则空格将成为字符串的一部分。
尝试这个:
header, response = client.request( 'https://api.twitter.com/1.1/statuses/user_timeline.' 'json?include_entities=true&screen_name=' + username + '&count=1')
字符串将自动连接。