Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια
σε

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

Παρουσίαση με Ετικέτες

Όλες οι Ετικέτε... » Posts » Python » HowTo   (RSS)
  • HowTo: Extract numeric suffix from a string in Python

    I recently needed to extract a numeric suffix from a string value in Python. Initially I did the following: import re def extractNumSuffix(value):     return (None if (search:=re.search(‘^\D*(\d+)$’, value, re.IGNORECASE)) is None else search.group(1)) Note that return has a single-line expression. So ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Αυγούστου 24, 2020
  • HowTo: Install Python, PIP and cx_Oracle on MSYS2 / Windows

    Here’s how to install Python, PIP package installer and cx_Oracle extension module on MSYS2: $ pacman -S python warning: python-3.8.3-1 is up to date — reinstalling resolving dependencies… looking for conflicting packages… Packages (1) python-3.8.3-1 Total Installed Size:  108.66 MiB Net Upgrade ...
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Αυγούστου 23, 2020
  • HowTo: make raw_input & input work the same in both Python 2 and 3

    Was just trying to make a Python 2 script work in Python 3 and at first it seemed I just needed a small change to add missing parentheses to the argument of a couple of print statements. But then another issue came up, it wasn’t understanding the command raw_input(somePrompt) that was occuring at various places […]
    Δημοσιεύτηκε στο George Birbilis' blog (Weblog) από το μέλος birbilis στις Ιουλίου 10, 2020
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems