Bring Your Logic using Python
341 subscribers
109 photos
1 video
4 files
544 links
Logic building using Python : Materials, links, e-books and Code snippets
Download Telegram
This can be reduced further.

Party trick to avoid the lambdas.
The funny thing is the space is the only magic here; Python is a truly object-oriented programming language, so integers have methods too. Add that * is just calling __mul__() means you can do that to any object.

Now knowing you need that space to make the parser happy?!!👴
👴 #Python wisdom for the day: you can directly call methods on integers (remember, Python is fully object-oriented; no automatic boxing needed here 😉)
Python makes it easy to create an uncompressed tar file. All you need is the `tarfile` library, which comes with Python!
🐍Python Tip: To convert your strings to be URL friendly. For example, when constructing an API request/query strings, you can use urllib's quote method like so 👆🏻
#networkautomation #python #python3