文字列の最後にcountintを追加しようとしています(WebサイトのURL):
コード:
count = 0
while count < 20:
Url = "http://www.ihiphopmusic.com/music/page/"
Url = (Url) + (count)
#Url = Url.append(count)
print Url
が欲しいです:
http://www.ihiphopmusic.com/music/page/2
http://www.ihiphopmusic.com/music/page/3
http://www.ihiphopmusic.com/music/page/4
http://www.ihiphopmusic.com/music/page/5
結果:
Traceback (most recent call last):
File "grub.py", line 7, in <module>
Url = Url + (count)
TypeError: cannot concatenate 'str' and 'int' objects