MemesR wou
MemesR wou

Reputation: 3

Split AttributeError, "'str' object has no attribute 'spilt'"

text is shown below, I've searched high and low for the solution, but can't find anything. any help is appreciated

import random
from aiohttp import request
from aiohttp import web
from random import randint

response = request.__get__('https://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text%2Fplain')

r = request.__get__(response)
dootdoot = r

indivial_words = str(dootdoot).spilt()
random_number = randint(0, len(indivial_words))

print(indivial_words[random_number] + str(random_number))

I've looked on this site, and a few others, and tried typecasting in the code, but it doesn't seem to be working.

Upvotes: 0

Views: 2142

Answers (1)

willdalh
willdalh

Reputation: 83

You misspelled split.

indivial_words = str(dootdoot).split() # instead of .spilt()

Upvotes: 3

Related Questions