Q:

Python: How do I replace value in a nested list?

How do I replace James's salary from 1000 to 1500 and print James's data?
data = [['Ben', 'Manager', 3000],
           ['James', 'Cleaner', 1000],
           ['Ken', 'Supervisor', 2000]]

for (name,appt,salary) in data:
    if name == 'James':
        salary = 1500
        print(linked_data[1]) 

Here's my current output:
['James', 'Cleaner', 1000]

Expected output:
['James', 'Cleaner', 1500]

A:

You need to find the index at which it occurs. Use enumerate.
for idx, (name,appt,salary) in enumerate(data):
    if name == 'James':
        # salary is at index 2 in the inner list
        data[idx][2] = 1500
        print(f"{name},{appt},{salary}")

A:

You are unpacking from the list in for loop and creating 3 variables name, appt and salary. With this variables it isn't possible to easily change your  data structure. What you need is extract a list from data and access it by indexing: 
from pprint import pprint

data = [['Ben', 'Manager', 3000],
           ['James', 'Cleaner', 1000],
           ['Ken', 'Supervisor', 2000]]

for d in data:
    if d[0] == 'James':
        d[2] = 1500
        print(d)  # prints only changed row

pprint(data)  # prints whole structure

Prints:
['James', 'Cleaner', 1500]
[['Ben', 'Manager', 3000],
 ['James', 'Cleaner', 1500],
 ['Ken', 'Supervisor', 2000]]

