In the shortest mode of clash of code, I end up using raw_input function many number of times. So,is it possible to create any shorter alias or macro to reduce the code size and also any other code-golfing technique related to python is welcome!!
Adding a macro specifically for code-golfing is not the way. You should abstract your reading to reduce code size instead. Try
r=raw_input;r();r() or similar.
Python is good but not great at Shortest mode.
Another idea: Use input() instead of int(raw_input()) when reading in numbers.
There are very few languages which are practical only for code golfing. And, luckily, none of them are Codingame languages.
In other words, all languages on Codingame have practical uses and their use in code golfing is just for fun and for brain exercise.
Python is a great language to use on this website.
Shorter languages (for code golf) are Perl and Ruby, but I don’t recommend learning them only for this one reason.
Only 1/3 of Clashes are Shortest mode, so just get used to occasionally losing to Ruby masters there (you’ll still beat most other languages). Python is better for the other 2 modes, Fastest and Reverse, so spend time practicing it is good time usage.
There are other code-golf tricks for Python, if you see someone beat your Shortest Clash in Python then ask them how they did it in the chat afterwards.
@JamesMcG, well that’s the thing:), before I can ask the player who beat me, they disappear without any replies. I have never been able to get a reply from anyone who beat me. Is there another way to ask a question to someone?
Yes, there is. You can use PM. Or you can just mention the player’s name in chat, the player will be notified about this and summoned to that chat (but he/she still may choose not to answer, you know).