Re: [Tutor] Running Python 3 on Linux Mint

2019-01-15 Thread Kai Bojens
On 14/01/2019 –– 16:56:23PM -0700, Mats Wichmann wrote: > Given the impending end of support for Python 2 - officially less than a > year now - distros have been surprisingly slow in switching to Python 3 > being the default (meaning instead of having to specially ask for > python3, you would hav

Re: [Tutor] (no subject)

2018-04-25 Thread Kai Bojens
On 25/04/2018 –– 12:19:28PM -0600, Mats Wichmann wrote: > I presume that's pseudo-code, since it's missing punctuation (commas > between elements) and the country codes are not quoted Yes, that was just a short pseudo code example of what I wanted to achieve. > you don't actually need to ch

Re: [Tutor] Dict of Dict with lists

2018-04-25 Thread Kai Bojens
On 25/04/2018 –– 18:35:30PM +0100, Alan Gauld via Tutor wrote: > > ... > > for line in logfile: > > result = pattern.search(line) > Doesn't this overwrite your data structure? > I would strongly advise using another name. You are of course right. I accidentally shortened this name as

[Tutor] Dict of Dict with lists

2018-04-25 Thread Kai Bojens
Hello everybody, I'm coming from a Perl background and try to parse some Exim Logfiles into a data structure of dictionaries. The regex and geoip part works fine and I'd like to save the email adress, the countries (from logins) and the count of logins. The structure I'd like to have: result = {