Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ProbEnthought Canopylems with
#2
Some observations:

- you (probably) use Python 2. I suggest to switch to Python 3. Python 2 is EOL at the end of this year

- as stated in error - there should be no intent. Return statement must be on same level as previous row (row #4).

- you have statement 'print len', assuming that this is Python 2 it works but output will be <built-in function len>. Is it what you want?

- Python intentation is 4 spaces

- if you need permutations then have a look at built-in module itertools and function defined there itertools.permutations(). There is code provided how permutations function (roughly) works.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
ProbEnthought Canopylems with - by kendias - Jan-19-2019, 02:36 AM
RE: ProbEnthought Canopylems with - by perfringo - Jan-19-2019, 05:53 AM
RE: ProbEnthought Canopylems with - by kendias - Jan-19-2019, 05:01 PM
RE: ProbEnthought Canopylems with - by kendias - Jan-19-2019, 10:30 PM

Forum Jump:

User Panel Messages

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