python code for this question

Suppose user selfies are saved locally in the format "name-ucode", where ucode is a unique code for that user. For example, for a user called Paul, his selfie will be saved as "paul-12345.jpg". Write a function which takes in the selfie name and returns the unique code. For example, the function will take input "paul-12345.jpg" and return "12345". Next, we want to upload the selfie "paul-12345.jpg" to an S3 bucket called "kwikpic_selfies". Write down the function to do so. The S3 object should be saved as "12345.jpg" in the bucket