code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.Customer.modify_source(
    "cus_8TEMHVY5moxIPI",
    "card_1LSdvI2eZvKYlo2CS9wK7l0M",
    name="Jenny Rosen",
  )
  '''Response {
    "id": "card_1LSdvI2eZvKYlo2CS9wK7l0M",
    "object": "card",
    "address_city": null,
    "address_country": null,
    "address_line1": null,
    "address_line1_check": null,
    "address_line2": null,
    "address_state": null,
    "address_zip": null,
    "address_zip_check": null,
    "brand": "Visa",
    "country": "US",
    "customer": "cus_8TEMHVY5moxIPI",
    "cvc_check": "pass",
    "dynamic_last4": null,
    "exp_month": 8,
    "exp_year": 2023,
    "fingerprint": "Xt5EWLLDS7FJjR1c",
    "funding": "credit",
    "last4": "4242",
    "metadata": {},
    "name": "Jenny Rosen",
    "redaction": null,
    "tokenization_method": null
  }'''
nl: Update a card  If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Also, Stripe works directly with card networks so that your customers can continue using your service without interruption.
  
  
  When you update a card, Stripe typically validates the card automatically. For more details, see Check if a card is valid without a charge.
  Parameters address_city optional City/District/Suburb/Town/Village. address_country optional Billing address country, if provided when creating card. address_line1 optional Address line 1 (Street address/PO Box/Company name). address_line2 optional Address line 2 (Apartment/Suite/Unit/Building). address_state optional State/County/Province/Region. address_zip optional ZIP or postal code. exp_month optional Two digit number representing the card’s expiration month. exp_year optional Four digit number representing the card’s expiration year. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. name optional Cardholder name.ReturnsReturns the Card object