Re: [Tutor] Query regarding Regular Expression

2017-06-28 Thread Alan Gauld via Tutor
On 28/06/17 21:27, cookiestar227 - Cookie Productions wrote: > So far have understood everything except for the following example: > t = "A fat cat doesn't eat oat but a rat eats bats." mo = re.findall("[force]at", t) > What I don't understand is the [force] part of the Regular Expr

[Tutor] Query regarding Regular Expression

2017-06-28 Thread cookiestar227 - Cookie Productions
I am using Python version 3.6.0 and am learning Python as my very first programming language. Right now I am studying Regular Expressions. We are finding all of the matched substrings in a string using the "findall" method with the following syntax: re.findall(pattern, string[, flags]) Here is

Re: [Tutor] Choosing between dictionary or external file

2017-06-28 Thread Alan Gauld via Tutor
On 28/06/17 17:44, Henrique C. S. Junior wrote: > using dictionaries to store information. Here is an example: > > > basis_sets = { > "Pople-style basis sets": { > "3-21G": "Pople 3-21G (H-Cs)", > "STO-3G": "Minimal basis set(H-I)", > "3-21GSP"

[Tutor] Program to check Python 2 syntaxes incompatible to Python 3?

2017-06-28 Thread STF
Hi, After reading some articles about Python 2 vs Python 3 issues and web pages like: https://docs.python.org/3/whatsnew/3.0.html https://wiki.python.org/moin/Python2orPython3 I'm wondering if there's any program/tool to list out incompatible syntaxes in a Python 2 source file. I know the 2to3 t

[Tutor] Choosing between dictionary or external file

2017-06-28 Thread Henrique C. S. Junior
Dear colleagues, how are you? I'm a scientist that is just starting with Python. I've decided to write a small software to generate inputs used in a Quantum Chemistry package. basically, we have to choose from several lists of options. Right now, I'm using dictionaries to store information. Here is

[Tutor] [Python2.7] Convert (2,188,1) into (188,1)

2017-06-28 Thread Allan Tanaka via Tutor
Hi. I have array shape like: (2,188,1). I want to make it like this: (188,1). I try that using .reshape(188,1) but throws an error: total size of an array must be unchanged Thank you for the help! ___ Tutor maillist - Tutor@python.org To unsubscribe o