0
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
https://sololearn.com/compiler-playground/cUxKrI36xtk9/?ref=app
5 Answers
+ 1
Python functions are conventionally written in lowercase. Classes are capitalized. if you're in an ide that have a code linter, you'll have squiggly lines under them.
you're using f-string and string concatenation using randomly. it makes reading the code confusing. stick with f-string.
my personal preference is to keep the code as simple as possible. just enough to get the job done.
+ 1
this is valid f-string:
print(f"{'='* 40}\n ")
0
Bob_Li Actually I'm learning on my phone so far because I don't have a laptop but I'll really pay attention to what you say in the future. Are there any other mistakes I can avoid in the future or that will help me develop at the moment?
Thank you very much for your adviceđđ»
0
Bob_Li But I didn't use string concatenation except in the separator. As for the f-string, do you mean that I should use it a little less? I think I didn't understand you well.
0
Bob_Li Ok, now I understand you. I didn't know I could use the f-string like this. Thank you very much.