我想添加东西到没有逗号的字符串。添加到没有逗号的字符串
我有一个字符串URL:http://gdata.youtube.com/feeds/api/standardfeeds/feed_str?max-results=max_result&time=
feed_str = top_rated
max_result = 5
time_str = today
web_str = "http://gdata.youtube.com/feeds/api/standardfeeds/",feed_str, "?max-results=" ,max_result,"&time=" + time_str
它打印这样
('http://gdata.youtube.com/feeds/api/standardfeeds/', 'top_rated', '?max-results=', '5', '&time=today')
,我想它来打印这样的:
('http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?max-results=5'&time=today')
这只是一个字符串。任何帮助?!
线索已经在你的代码中的许多线程。看看你的输出。在字符串构造中使用变量'time_str'的方式有什么不同? –