Re: [Tutor] Theory of computation non-emptiness

2018-04-21 Thread Alan Gauld via Tutor
On 21/04/18 12:50, tracey jones-Francis wrote: > Hi there, I've been working on code I've only glanced at this but one thing jumped out at me: > while queue: > currentState = queue.pop(0) > visited.append(currentState) > #print(visited) > for a in newAplhabet: > if (currentState, a) == (newStat

[Tutor] Theory of computation non-emptiness

2018-04-21 Thread tracey jones-Francis
Hi there, I've been working on code that takes a text file that represents a specific Deterministic Finite Automata. The text files are set up in a specific way so that line 1 specifies the number of states. Line 2 specifies the states (i.e., just a list of the names of the states, separated b

Re: [Tutor] XML Programs

2018-04-21 Thread Albert-Jan Roskam
On Apr 21, 2018 09:06, Peter Otten <__pete...@web.de> wrote: > > Glen wrote: > > > Thank you for your comprehensive reply. It was very helpful! > > Just to clarify one point, is it not possible to search for a node > > directly in the element / elementTree or do you first need to pull the > > data

Re: [Tutor] XML Programs

2018-04-21 Thread Peter Otten
Glen wrote: > Thank you for your comprehensive reply. It was very helpful! > Just to clarify one point, is it not possible to search for a node > directly in the element / elementTree or do you first need to pull the > data into a class/dict? You certainly have other options >>> catalog.xpath("/