101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

513
active users

#pythontips

0 posts0 participants0 posts today

How to Convert a Hex String to an Integer in Python
Learn how to Convert hex string to integer in Python! This post shows 3 robust methods, including error handling, for various scenarios. Perfect for beginners and experienced coders alike. Check it out! #Python #Hexadecimal #IntegerConversion #Programming #Coding #PythonTips
tech-champion.com/data-science
Learn how to convert a hex string to an integer in Python including handl...

Is there some good solution for automatically fixing an import on python file?

Say, you use Path, and need to add "from pathlib import Path" ? Ideally, by using some keyboard shortcut.

I'm using VS Code if that matters. I saw there has been python.analysis.autoImportCompletions setting which has been criticized for slowing your computer. Is there any solution which would not?

Something more basic today for #DailyPythonista.

From time to time, I have to remind myself what was the `sys.argv` content.

So, basically it's a list of strings. It can be accessed e.g. via iteration, like `for arg in sys.argv: print(arg)`

The first argument is always the name of the file applied.

Other arguments are given as strings on indexes matching their position - no off-by-one error in this case!

On the snippet: the loop proposed above, executed.