How to read and write files in Python from a PHP coder’s perspective
Like PHP, Python provides built-in support for encoding and decoding JSON data. We cover the fundamentals in this article.
PHP offers isset() to test for the existence of variables and elements. A look at some equivalent tools that Python provides.
Learn how to use Python’s type() and isinstance() functions, the Pythonic counterparts to PHP’s gettype() and instanceof.
A look at Python’s random module – how it differs from PHP’s rand() and what it adds.
PHP supports multiline strings with the heredoc text syntax. We take a look at a commonly used Python equivalent.
Most programs of any complexity must change their behaviour according to circumstances. Conditional statements are among the principle tools for the job.
Accepting and processing raw materials, rendering back useful products, functions are the magic machines at the heart of your programs.
At the core of coding is the ability to change data and behaviour. For that you need to define variables and assign data to them.
You have to start with “Hello, World”, and that means printing it. We begin the project by digging in to Python’s print function.