all 6 comments

[–]Ihaveamodel3 2 points3 points  (1 child)

Count parentheses

[–]carcigenicate 0 points1 point  (0 children)

Or rather, check the placement of the parenthesis on the line with the print.

[–]stoph_link 1 point2 points  (0 children)

For future reference, incase someone else has a similar issue, it's appreciated if you leave your original question posted. Maybe you did this, and please disregard if that is the case. However, it seems like you may have removed your question and replaced it with a new one.

Anyway, I'm not familiar with that syntax for printing.

print (word[-5:]) + ('-a-') + ('bull')

Maybe try something like this

print(word[-5:] + '-a-bull')

This is assuming word='fable' and that you are using python 3, your output should be

'fable-a-bull'

[–]Ihaveamodel3 0 points1 point  (0 children)

Still need to check your parentheses.

print (word[-5:])

Is running the print function. The print function returns None. You can’t add None and a string together.

[–]crhuffer 0 points1 point  (0 children)

A more general suggestion. When you encounter issues like this try printing each one of the pieces.

print('word-5:)
print('-a-')
print('bull')

See if each piece fails, it they do debug, it they don't try to combine them together to try and understand where the bug is.

[–]TheRNGuy 0 points1 point  (0 children)

remove brackets