I have the code:
a = {"listA" : ("keyA", "keyB"), "listB" : ("keyC", "keyD")}
How can I for example remove the KeyB so:
a = {"listA" : ("keyA"), "listB" : ("keyC", "keyD")}
You have a dict not a list with tuples as values, you would need to reassign the value as tuples are immutable so you cannot remove an element:
a = {"listA" : ("keyA", "keyB"), "listB" : ("keyC", "keyD")}
a["listA"] = a["listA"][0],
print(a)
If you want to be able to modify the values use lists as values which are mutable:
a = {"listA" : ["keyA", "keyB"], "listB" : ["keyC", "keyD"]}
a["listA"].remove("keyB")
print(a)