I messed python somehow

I tried downloading Python but while downloading I got urgent work so I had to cancel installation since, it was taking too much time so I closed it with task manager. Later I tried downloading again but it wasn’t installing and got stuck. So my inner genius thought to delete it directly from files rather than going to apps and uninstalling it. It now gets stuck on tdl/tk something. I restarted Windows and got an error log. I want to download Python please help. (I use Windows 10)

Check in the windows registry for python related keys.
I suspect you will need to delete some of them.
But if you are not confident editing the registry beware this can break windows.

is there any safer method?

Not that I am aware off. Killing the installer from task manager means none of the normal safe guards were allowed to save you.

is there no way to revert any changed made by it?

Yes - use the regedt tool to edit the registry.
But as I said that is a tool that is dangerous if a mistake is made.

You could reinstall Windows using its recover mechanism.
That will fix registry and you can keep your user files.

unfortunately, some important data will get removed if I do that. Ig I won’t be able to use Python. Well is there any last chance with the log file?

Just install another of pthon … Everthing will be solved

what do you mean? another version?