Skip to content
loading...

Python tips 101

Rattanak Chea on October 26, 2018

I have background with mostly JavaScript and a strong type language such as Java. Because Python's popularity in Machine learning, AI, data science... [Read Full]
markdown guide
 

I am really looking forward to more content from you. I am from ruby on rails background and recently switched to python background recently.

In two months I learnt the following, ipython shell which is far better than default python shell that I have been using. It has function name completions, commands repeat to name a few of its features.

One thing I loved the most is that I could look into the doc string in the shell itself by simply appending ? to the end of the function name. Example lets say I have a class test and there is an instance function run. In the console I simply type test.run? and I get the doc string for that. I find it pretty cool and amazing.

Do you have any such tips that you can share with us?

 

Thanks for sharing the tips. They are useful to know.

If you are curious about the language itself, there are many good resources online. Here are a few:
book.pythontips.com/en/latest/
hackernoon.com/python-tricks-101-2...

But it seems like you are curious about the work flow and tools to make development easier.
I use VS code and install python extension which allows me to run and debug python code easily.

 
 

list[::3] # [1, 3, 5, 7, 9]

That should be list[::2] btw :)

 

@V Dedo, nice catch. I updated the code. Thanks.

code of conduct - report abuse