In Python what is the difference between an iterable and an iterator?
An iterable (like a list, tuple, dictionary) are objects that returns an Iterator if you call iter() on it. That means that an iterable must implement the __iter__ method. An iterator returns data...
read moreTutorial Python Classes
Here is Python class named “Person” (by convention usually CamelCase starting with uppercase) and created an instance of that class called “john” … In line 2, you have...
read moreTutorial Reading JSON in Python
Previously we done API fetching for PHP, now in this tutorial we will be reading JSON data in Python connecting to … https://jsonplaceholder.typicode.com/todos/ to retrieve some dummy data...
read moreTutorial Python Debugging with pdb
You temporarily insert this debugging statement, which stops Python execution at that point and turns on “python debugger” (pdb) … Now when you execute the program you can interact...
read moreTutorial Python Lambda
The way you spell “lambda” is to remember to spell the animal “lamb” first. Lambda are just anonymous functions that are used once in-line — like Javascript anonymous...
read morePyton 3 Quick Notes
Not backwards-compatible with Python 2. Dynamic typing. Variables are by convention lowercase and snake_case instead of camelCase. It makes sense for Phython to be snake_case (Ha Ha). No hyphens in...
read moreWhat is the difference between react-router and react-router-dom?
In short, if you are building a web app in React and you want to use React Router, just install “react-router-dom”. If you are building React Native, install...
read moreServer and Client side example of WebSockets using Node
In this example, we will implement WebSockets in Node server side first. And then we will create client-side HTML page to connect to that WebSocket via Javascript so that we can get a two-way...
read moreGenerating Fake Data in json-server
Continuing from previous tutorials here and here, we first install the npm modules faker and lodash to generate fake data. Then add new file “generator.js” which is a module.exports of a...
read moreAll contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.