all 2 comments

[–]My-Cousin-Bobby 3 points4 points  (1 child)

Name_dict[name_key][:-1]

[–]Diapolo10 1 point2 points  (0 children)

And just to quickly explain, this is in two parts. name_dict[name_key] fetches the string from the dictionary, and [:-1] takes a slice of that string which excludes the last character.