Python Forum
Stuck with using lists to solve task
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stuck with using lists to solve task
#10
I find it less complicated that it seems.
Why it is called an exercise on lists, dunno...?
I think that starting like this
open = True
closed = not open
cells = [closed] * 100
saves you at least 10 lines of code.
(you save some if .. else statements)
I do use "enumerate", not knowing if that is allowed.
What is our friend the TS doing in the mean time?
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
Stuck with using lists to solve task - by gery576 - Jan-15-2024, 11:03 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 06:57 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 08:44 AM
RE: Stuck with using lists to solve task - by DPaul - Jan-16-2024, 06:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to solve this task? DERO 2 1,841 Dec-06-2021, 07:15 PM
Last Post: BashBedlam
  simple task with lists... Maxwell123 3 2,421 Jun-27-2020, 01:00 PM
Last Post: GOTO10
  I need help to solve this task using while statement rico4pepe 6 9,312 Apr-02-2020, 11:34 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

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