This forum is now read-only. Please use our new forums at discuss.codecademy.com.

How to use APIs with Python Forum

View Course

462 points
545ba0e4282ae34dbd003bd6_684009006
Submitted by
Qdigger
over 2 years ago

17/20 answer, how is this possible?

here is my code:
from urllib2 import urlopen

var = website = urlopen("http://placekitten.com/")
var = kitten = website.read("http://placekitten.com/")

print kittens[559:1000]
I am not sure what is wrong, please help!


0 votes

permalink

help!

462 points
545ba0e4282ae34dbd003bd6_684009006
Submitted by
Qdigger
over 2 years ago

1 Comment

38a04189332e4280c10eb015d0513ed2?s=140&d=retro invisibletank about 2 years ago

First, do not use var. Second, read should not take any argument; it should be kitten = website.read().