so I though best would be `variable or None` but that doesnt work here
You would need to check if it exists earlier and it doesn't, assign a different variable to None. I would approach it like: check if the key/index you want exists. If it does, assign a variable to it. If it doesn't, assign that variable to None. Then use that variable in the f-strinf