Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lists + Empty Lists
#8
Would something like this work:

days = ['Monday','Tuesday', 'Wednesday', 'Thursday','Friday', 'Saturday', 'Sunday']

#Create empty lists for weekdays and weekends
weekdays = []
weekends = []


index = 0
while index < len(days):
day = days[index]
print( days )
index = index + 1
Larz60+ write Mar-23-2021, 12:17 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
Lists + Empty Lists - by Pytho13 - Mar-22-2021, 06:39 PM
RE: Lists + Empty Lists - by Axel_Erfurt - Mar-22-2021, 06:47 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-22-2021, 06:48 PM
RE: Lists + Empty Lists - by Axel_Erfurt - Mar-22-2021, 06:52 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-22-2021, 06:53 PM
RE: Lists + Empty Lists - by Larz60+ - Mar-22-2021, 06:59 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-22-2021, 07:07 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-22-2021, 07:18 PM
RE: Lists + Empty Lists - by Axel_Erfurt - Mar-22-2021, 07:40 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-22-2021, 08:20 PM
RE: Lists + Empty Lists - by Axel_Erfurt - Mar-22-2021, 08:30 PM
RE: Lists + Empty Lists - by deanhystad - Mar-22-2021, 08:49 PM
RE: Lists + Empty Lists - by Pytho13 - Mar-23-2021, 11:40 AM
RE: Lists + Empty Lists - by snippsat - Mar-23-2021, 01:09 PM
RE: Lists + Empty Lists - by Larz60+ - Mar-23-2021, 09:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Using Lists as Dictionary Values bfallert 8 351 Apr-21-2024, 06:55 AM
Last Post: Pedroski55
  problem with print lists MarekGwozdz 4 697 Dec-15-2023, 09:13 AM
Last Post: Pedroski55
  python convert multiple files to multiple lists MCL169 6 1,568 Nov-25-2023, 05:31 AM
Last Post: Iqratech
  Lists blake7 6 772 Oct-06-2023, 12:46 PM
Last Post: buran
  Trying to understand strings and lists of strings Konstantin23 2 777 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Why do the lists not match? Alexeyk2007 3 823 Jul-01-2023, 09:19 PM
Last Post: ICanIBB
  ''.join and start:stop:step notation for lists ringgeest11 2 2,445 Jun-24-2023, 06:09 AM
Last Post: ferdnyc
  Need help with sorting lists as a beginner Realist1c 1 752 Apr-25-2023, 04:32 AM
Last Post: deanhystad
  Pip lists the module but python does not find it Dato 2 1,294 Apr-13-2023, 06:40 AM
Last Post: Dato
  Generate lists of devices and partitions from /proc/partitions? DachshundDigital 1 782 Feb-28-2023, 10:55 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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