Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: makingVariable declaration mandatory
Post: RE: makingVariable declaration mandatory

If you use Python 3.6 and higher you could use variable annotations, like this a: intPyCharm will be able to use it as type hints and produce warnings in case if wrong type used.
leotrubach General Coding Help 5 3,022 Aug-26-2018, 04:59 AM
    Thread: So I was learning python
Post: RE: So I was learning python

First of all you don't need % sign for formatting, logging allows you to do so. You simply write: logging.debug('Return value is %s', (total))or, as another option you could write comma so it is tupl...
leotrubach General Coding Help 8 4,238 Aug-26-2018, 02:08 AM
    Thread: [Python 3] - Extract specific data from a web page using lxml module
Post: RE: [Python 3] - Extract specific data from a web ...

Using xpath() method of ElementTree you could query all td elements without span child like this: from lxml import html html_text = """<html> <head> <title>foo</title> ...
leotrubach Web Scraping & Web Development 9 7,154 Aug-25-2018, 08:46 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020