| ▲ | Surac 2 hours ago | |
I at the moment try to learn python as a hobby language. I use c c++ and c# to earn my money. MY biggest problem is finding good examples that are up to date. I spent a whole day learning that there a four (I think) ways to do formatting strings. This „bloat“ in syntax makes even a simple print very heavy to digest. I don’t even bother using v2 python only v3. Also using whitespaces to block things together sounds appealing but in reality you need to use editors that can indent and unindent whole blocks or I never get it right | ||
| ▲ | Stratoscope 2 hours ago | parent | next [-] | |
You seem to be making things more difficult for yourself than they need to be. For the strings, just use f-strings and forget all the others. You can even do things like this for debugging:
For the block indenting, what editor are you using? Pretty much every modern editor lets you select a block and indent/unindent with Tab/Shift+Tab.VS Code and PyCharm are both free and are great for Python coding. They each have a full debugger, which is invaluable when you are learning a language. | ||
| ▲ | lenkite 2 hours ago | parent | prev | next [-] | |
15 years ago, Python programmers used to mock Perl by quoting the Zen of Python: "There should be one - and preferably only one - obvious way to do it.". This was in stark contrast to Perl's TIMTOWTDI motto: "There Is More Than One Way To Do It." The Zen of Python is sadly now an absolute lie. | ||
| ▲ | IshKebab 2 hours ago | parent | prev [-] | |
> but in reality you need to use editors that can indent and unindent whole blocks or I never get it right What editor are you using that can't do that? Notepad? | ||