In this short article, I want to introduce you Python and provide some basic steps to start learning.
First of all, consider the advantages of Python:
Crossflatformed, easy-to-read, popular, contains lots of methods to make web-apps, games(include Android) and, of course, you can do Python for a living, Python-developers are needed to work in Google, Yandex etc.
The main disadvantage of this language is speed. If your project or program requires fast implementation, you have to use C++, C or other fast languages.
After this introduction, you might imagine how it's easy to work in a big company using only Python — of course, it's not true, you should study lots of other things in Computer Science, but Python provides to every person methods to complete their own projects.
Now, consider some tricks which we can use in competitive programming to decrease the time of making your program
1. If your task requires repeat string n times, you don't have to use cycles like "for" or "while", you may only write:
s = n * s
In this case, if n = 5 and s = "ab", the result of the program will be:
s = "ababababab"
Quite easier than other languages, isn't it?
2. Consider case if you need to replace two variables. Quite simple in every language, isn't it?
For example swap() function in C++. But what if you need to replace 3 or four variables? To make a, b, c, d equal to b, c, d, a.
Quite difficult in C++, but in Python just write:
a, b, c, d = b, c, d, a
So, if a was 1, b was 2, c was 3, d was 4 then after this code it will be 2, 3, 4, 1 respectively.
Hope, now you're interested in Python!
Now you can download IDE from https://www.python.org/getit/ and try to complete your first program using such textbooks:
In Russian this one: https://pythonworld.ru/samouchitel-python
I hope I made you interested in Python because I am going to make such posts every week, consider some interesting tasks and provide useful books or notes.
See you soon :)