5 Python tricks that will improve your life

preview_player
Показать описание


#coding #programming #javascript
Рекомендации по теме
Комментарии
Автор

0:48 - The interactive shell (python -i file.py)
1:49 - Python Debugger (import pdb - standard library)
2:56 - Virtual Environments
4:19 - List and Dictionary comprehensions
6:34 - Lambda functions

sandervanrijn
Автор

Don’t fall into the trap of rating code by counting lines (re: list comprehension). Your code ought to be efficient, but MUST be readable. The best code is that which future peers can read reasonably quickly.

baphnie
Автор

It's depreciated by PEP8 to assign lambda functions. They are mainly used for stuff like this:

tuples = [(1, 5), (1, 3), (1, 4)]
tuples.sort(key=lambda x: x[1])
print(tuples)
OUTPUT:
[(1, 3), (1, 4), (1, 5)]

For 1 line functions do:
def add(a, b): return a + b

mateuszkolpa
Автор

Production quality is amazing.
Thank you brother.

saminchowdhury
Автор

For those asking what font

Dank Mono

What IDE/Text Editor?

VSCode

What theme?

Material Theme

phoehtaung
Автор

For Windows 10 using PyCharm with Python 3.7.6, when you initialize a virtual environment "virtualenv venv" in PyCharm Terminal on your project, new folder containts "Include, Lib, Scripts, tcl and Readme.txt", no /bin/. What you can do is cd to Scripts and then just type "activate" . should do it.

berkaykurkcu
Автор

List comprehensions are very powerful!
i've seen it in Haskell (functional programming language) where you could write quicksort in 2 lines

CordonbleuZz
Автор

The editing and the content is absolutely amazing
(P.S - need more videos like the tinder bot may be post a building a bot or something once a week)

ctrl
Автор

I'm just glad that I found this channel.

ahmedalgrai
Автор

Just remember guys: less code != cleaner code

igorthelight
Автор

I am taking a python class rn and this is extremely helpful! Wish I knew this a couple weeks of ago.

claymcclendon
Автор

Excellent vide, better than the majority of YouTube videos.

What I really need actually for now it's a complete semantic, syntax explanation of Python and languages in general

givdb
Автор

Awesome tips and tricks. I'm not a Python developer but I've been a software engineer for 20+ years. Let's keep sharing the knowledge

andre-barrett
Автор

This is extremely useful! I develop a lot with Python and had no idea about the interactive shell or the Python Debugger. Thank you!

bradylange
Автор

I love your channel. Been subscribed for a long time.

TubularAnimator
Автор

wow, thanks man. Python is really great. Yesterday I was given some excel sheets to work. Instead of doing it manually I use python pandas library.

gulshankumar
Автор

List comprehensions changed my life. I should probably be working more in virtual environments though.

_gpop
Автор

Wow, the edition of this video is incredible. The transitions, the camera, the light, the animations, wow. You have escalated a lot. From English teacher, passing through software developer, to a great content creator. Keep it up.

gabrielh
Автор

I’d recommend conda environments over virtualenv if you plan on using math or statistical libraries anyway. Conda’s numpy installation comes with Intel’s MKL and is worth using

grantwilliams
Автор

I love virtual environments. I mainly use them for system tests where the system is usually a medical device running Linux. I mostly do image processing within the venv - the system itself remains completely unchanged by the test. scp all the python stuff onto the remote system, execute via ssh, scp everything back onto the local machine and clean up the remote system. No installations, yet full fledged image processing.

TheCarmacon