Refer to cheat sheets for Python from here:
https://drive.google.com/drive/folders/1IKh9O4m-ScqOj8ZK2VcD8eZggAXiEK7k
Learn Python by building a project: https://www.youtube.com/watch?v=Dn1EjhcQk64
If you are starting your DevOps engineer journey and want to learn Python, the question you might have is, how much Python is required for DevOps?
Here is a Python learning roadmap for DevOps Engineers with the relevant resources.