Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list - 2 questions:
#18
(Jul-31-2021, 12:23 PM)ndc85430 Wrote: Why did you think you needed the line my_list = [] in the first place? All it was doing was creating a local variable called my_list that was shadowing the function parameter, so that the function parameter was inaccessible.

because otherwise it wouldnt count as a list, but I just realized that the new_list thingy, because it has there My_list and i did there [] with stuff in it, it counts as list.
that thing is new to me, thanks :)
about the last thing of the question, adding the and magnesium.
if im doing new_list[-1] ill get: and boron ( of course, because new list is a other list with jumps of 2 ).
if ill try my_list, it wont work, because its not a variable.
what am i supposed to do now?
I tried to create a new variable of list and then modify it to have the last -1 of the my_list, but nothing seems to work.
Reply


Messages In This Thread
list - 2 questions: - by ben1122 - Jul-31-2021, 11:33 AM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 11:36 AM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 11:41 AM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 11:43 AM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 11:46 AM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 11:48 AM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 11:44 AM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 11:45 AM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 11:47 AM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 12:05 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:08 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 12:10 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:16 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:17 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:17 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:19 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 12:23 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:31 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 12:37 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:39 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:37 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:40 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:49 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 12:50 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 12:53 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 01:00 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 01:03 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 01:24 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 01:32 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 01:36 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 02:03 PM
RE: list - 2 questions: - by ndc85430 - Jul-31-2021, 02:05 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 02:24 PM
RE: list - 2 questions: - by deanhystad - Jul-31-2021, 03:11 PM
RE: list - 2 questions: - by ben1122 - Jul-31-2021, 03:31 PM
RE: list - 2 questions: - by deanhystad - Jul-31-2021, 05:06 PM
RE: list - 2 questions: - by Pedroski55 - Jul-31-2021, 11:18 PM
RE: list - 2 questions: - by Pedroski55 - Jul-31-2021, 11:48 PM
RE: list - 2 questions: - by Pedroski55 - Aug-01-2021, 03:06 AM
RE: list - 2 questions: - by snippsat - Aug-01-2021, 04:27 PM
RE: list - 2 questions: - by naughtyCat - Aug-18-2021, 05:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Discord bot that asks questions and based on response answers or asks more questions absinthium 1 43,384 Nov-25-2017, 06:21 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

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