Basic Python Questions about lists and for loops

I’m new to Python and have only worked with lists briefly in one other language. I have an list of lists. My inside lists are composed of a name and a time. So the structure is something like this:
alarms=[ [“chip”,“10:00”], [“sam”,“7:00”], [“susan”,“5:30”] ]

I have a for loop that I use to run through the list looking for specific names.

  for x in alarms:
    if x[0]==searchstr:
      self.log("Found it")
      break 
self.log("x={}".format(x))

When I am outside the loop, x prints out the correct list, x[0] prints out the name and x[1] prints out the time as expected.

Here are my questions

  1. Is x a pointer to the list in alarms or is it a separate copy of the internal list? In other words, can I change the value in x[1] and will that result in a change in the larger alarms list?
  2. Is there a better way to be doing this?
  1. x will be a copy of the reference to the original nested list, so you will be able to change the original nested list via index.
x[1] = new_value
  1. If names in the items are unique, instead create a dictionary.
alarms = {"chip": "10:00", "sam": "7:00", "susan": "5:30"}
print(alarms.get("chip"))

This will print 10:00.
To assign new value, if you know the name/key:

alarms["chip"] = "11:00"

You can iterate too.

for key, val in alarms.items():
    if key == searchstr:
        alarms[key] = new_time

do the json.dump and json.load functions work well with dictionaries? I need to be able to write the alarms out to an output file so that after a reboot, the correct alarms rooms and times can be reloaded.

Yes it should work. See these conversion tables:
https://docs.python.org/3/library/json.html#py-to-json-table
https://docs.python.org/3/library/json.html#json-to-py-table

Mind that the order of items in a regular dict is arbitrary.

Generally the python docs are pretty good and most python questions are already answered on stackoverflow etc.