Originally, I mainly touched PHP on the server side, or C language in school classes. This time, I started studying because Python seems to be efficient as a measure for job hunting coding tests.
When I touched Python, it was too simple compared to other languages, and as it is said, it was just English. It's so simple that I'm a little confused, unlike other languages. So, I will summarize my common mistakes. I'm new to Python, so I'm looking forward to it.
I have a lot of this. Python forgets because it doesn't use {} in for and if statements.
Most languages
for(i=0;i<N;i++){
#hogehoge
}
However, in python,
for i in range(0,N) :
#hogehoge
else:
#Processing after for is finished
It is a way of writing. It's nice to be able to write the processing after the for is finished with else!
if s in str :
print('s is in str')
if s not in str :
print('s in not in str')
You can write almost in English. That's why it's easy to forget the colon. .. .. Well, I'm used to it.
There is a feeling that it is different from other languages, but it is insanely fun to write. Also, the amount of description can be extremely small! !! I will study harder.