It's a nice python tutorial for beginners to learn how to work with strings and random bytes 👍, but there are already countless online password generators for everyday use.
For example, you can check mine at my blog which works online, is fully customizable and it can generate hundreds or thousands of random passwords based on multiple parameters like uppercase characters, lowercase characters, numbers, symbols, excluding characters, password length and how many passwords to generate in individual text boxes or in one big text area to contain them all.
There are also CLI tools for generating passwords if you want to use it in command line, like ts-pwgen which has many options to generate custom password.