[Tutor] problem solving with lists

dn PythonList at DancesWithMice.info
Mon Mar 21 01:25:27 EDT 2022


On 21/03/2022 03.55, marcus.luetolf at bluewin.ch wrote:
> Hello Experts and Helpers,
> a lot to answer:
> 
> yes, I am multi-langual. I should have said  "And other ...............knowledge of other programming  languages but python. 
> I have worked several online courses in python (coursera, edx etc.) over the past years,  including most of Alan Gould's 
> online tutorial. Therfore, a am still a beginner in python but not a learning beginner.

and a good idea is never to say 'this is just the same as in C' (or
whichever language), but to think: 'this is how we do it in Python'!

For example, Tok Pisin, a trading-language in Papua New Guinea (and
other places) 'borrows' many words from English and German. Thus
"brata", "bruder", and "brother". In this case, I'm unlikely to think
that the English word will do; but if I memorise it according to some
sort of logic like "it's close to the German 'original'" I will fail
(even if such pronunciation is likely to be understood). NB computers
are neither as friendly nor as forgiving as Papua New Guineans!


> My "real world problem" to build teams of unique composition ist exactly the same as to build unique
> sublists with letters. The latter beeing much easier do handle (typing(errors), readabilty etc.) to me.
> My goal was to explain my problem, algorithm, solution steps as precise as possible to avoid confusion.
> I might have not succeeded.

See @Dennis' comment on choosing meaningful names/identifiers. I'm happy
with the letters A through P in place of peoples' names - keeps things
short, until we're ready to 'go live' and work with 'real data'!


> dn's 'Results obtained:' (mail 20/03/2022 15.07)  were altered in his mail of  19.03.2022 04:03 resulting in 
> the exclusion of shared pairs, what was required. But there was no code offered. 

The reason at the time was the suspicion that it is a homework
assignment. You tell me this is not. However, the same learning/teacher
aspects may still apply.

If someone gives you the code/answer, then have you learned to solve the
problem? This is why at Tutor we try to lead you to the answer.

In this case, I'm not convinced that I (be relied upon to) lead you
anywhere!

The first step to writing any program[me] is to understand the problem.
I suspect we are both 'stuck' at this point - but better to speak only
for myself. (see current (?improved) attempt in separate message)


-- 
Regards,
=dn


More information about the Tutor mailing list