When you build up a #Python string use a list over string concatenation (+=).
See stackoverflow.com/a/3055541:
> Strings are immutable and can't be changed in place. To alter one, a new representation needs to be created.
So that happens repeatedly here = slower.
Btw instead of loop + append, I could also have used a list comprehension inside the .join()
Also this probably only becomes a problem for bigger data. I post it here for awareness, but writing readable / maintainable code should be your first focus.
Don't get stuck in tutorial paralysis, the best way to learn #Python and software development is to build real world applications ๐งต
You will hit so many issues, you'll have to constantly look things up, Stack Overflow becomes your new best friend and that is ok. It will turn you into a good developer.
Because it's not about memorizing things (even though you still will with increased practice), it's about becoming a good problem solver with a spark of creativity.