Day 077 - Project 77 : New pages blog + url shortener

If you have any questions, comments or issues with this project please post them here!

following the tutorial, but using multiple .replace() like this

page.replace("{name}", myName)

doesn’t work when i try it, only

page=page.replace("{name}", myName)

does. a miniscule issue but i still wonder why that is? i’m only copypasting from the tutorial.

This doesn’t work because strings in Python are immutable, once they are saved to memory they cannot be changed. When using page = page.replace("{name}", myname), you are creating a new string, separate to the old string. You can check this by using the id() function.

2 Likes

I’m having an issue with reflection showing in link form where there’s no href in html for that part… any thoughts? Thanks

and for some reason it’s not pulling my style.css file either