To delete a key regardless of whether it is in the dictionary, use the two-argument form of dict.pop() : my_dict.pop('key', None).
確定! 回上一頁