Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding lists to lists?
#4
A = 'a'
B = 'b'
items = []
items.append([A])
print(items)
items.append([B])
print(items)
Output:
[['a']] [['a'], ['b']]
Reply


Messages In This Thread
adding lists to lists? - by ivinjjunior - Apr-09-2019, 08:43 PM
RE: adding lists to lists? - by Larz60+ - Apr-09-2019, 09:10 PM
RE: adding lists to lists? - by loomski - Apr-09-2019, 10:01 PM
RE: adding lists to lists? - by Yoriz - Apr-09-2019, 10:08 PM
RE: adding lists to lists? - by perfringo - Apr-10-2019, 03:48 AM
RE: adding lists to lists? - by ivinjjunior - Apr-15-2019, 07:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare lists w_i_k_i_d 4 207 May-18-2024, 04:03 PM
Last Post: Pedroski55
Question Using Lists as Dictionary Values bfallert 8 516 Apr-21-2024, 06:55 AM
Last Post: Pedroski55
  problem with print lists MarekGwozdz 4 778 Dec-15-2023, 09:13 AM
Last Post: Pedroski55
  python convert multiple files to multiple lists MCL169 6 1,684 Nov-25-2023, 05:31 AM
Last Post: Iqratech
  Lists blake7 6 881 Oct-06-2023, 12:46 PM
Last Post: buran
  Trying to understand strings and lists of strings Konstantin23 2 847 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  Why do the lists not match? Alexeyk2007 3 895 Jul-01-2023, 09:19 PM
Last Post: ICanIBB
  ''.join and start:stop:step notation for lists ringgeest11 2 2,488 Jun-24-2023, 06:09 AM
Last Post: ferdnyc
  Need help with sorting lists as a beginner Realist1c 1 799 Apr-25-2023, 04:32 AM
Last Post: deanhystad
  Pip lists the module but python does not find it Dato 2 1,345 Apr-13-2023, 06:40 AM
Last Post: Dato

Forum Jump:

User Panel Messages

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