phpinfo() is not working on my CentOS server

I have PHP installed on my CentOS server. However, when running a phpinfo() inside my script to test it, I receive the HTML, not the interpreted information. I can see the folders for PHP. I can even see the php.ini in the etc folder. But PHP itself does not seem to be working. I mean … Read more

Visual Studio Python “Failed to launch the Python Process, please validate the path ‘python” & Error: spawn python ENOENT

I just downloaded Python and Visual Studio. I’m trying to test the debugging feature for a simple “Hello World” script and I’m receiving this error: Failed to launch the Python Process, please validate the path ‘python’ followed by this in the debug console: Error: spawn python ENOENT Could someone please help me out and tell … Read more

Printing subscript in python

If all you care about are digits, you can use the str.maketrans() and str.translate() methods: Which will output: Note that this won’t work in Python 2 – see Python 2 maketrans() function doesn’t work with Unicode for an explanation of why that’s the case, and how to work around it.