PyWebIO – Helps to build webapps in Python. The main advantage is that no javascript nor the front end code is required. Refer to this site for more information on PyWebIO – https://www.pyweb.io/index.html Let’s see how to create our first web application using PyWebIO.
Tag Archives: startwithpython
Create First Project in Visual Studio
Open Visual studio and create a new Project. Search for Python in the templates. Select Python web project and click on “Next“. Then, click “Create“ This creates a new Python project and can be viewed under “Solution Explorer“. Let’s install a python library called Flask. Expand Python Environments, you should be able to see theContinue reading “Create First Project in Visual Studio”
Reduce
Reduce is a functionality that is introduced in Python that will take 2 elements at a time from either list or tuple and the result of that operation is again taken with next element in the list till we arrive at a solid answer and the list or tuple traversing is complete. Let’s understand thisContinue reading “Reduce”
Files and Directories
Python provides functions to write / read files and operations like reading contents from the directory. These functions play a trivial role as most of the programs involves reading files or directories. Let’s discuss few functions related to this. File Object – First step to read / write files in Python is using File object.Continue reading “Files and Directories”
Functions Again
ArgumentsConsider our previous function that was created that takes two parameters, num1 and num2. So, while calling the function we need to pass the same number of parameters i.e., if the function definition has two parameters, we need to pass two values, if the function definition has three parameters, we need to pass three values.Continue reading “Functions Again”
Dictionaries Again
We saw in the previous posts how to retrieve items from Dictionaries. Now, let’s learn other operations associated with Dictionaries in Python. Length of Dictionaries We have created a dictionary called as personDict. We can find the length of Dictionaries as shown below. Example: Output: This will display the number of items in a dictionary.Continue reading “Dictionaries Again”
Strings Formatting
Strings in Python is very much similar like the usage in other languages. I am going to point out the most important ways of strings formatting which is little different in Python. Assume that there is a scenario, where you are getting a value from a method and the value that is returned from theContinue reading “Strings Formatting”
SETs
Basic explanation of usage of sets in Python
Data Types
Datatypes are common concepts across every language. The data that is stored in a variable determines the data types. For Example: a variable that stores a text has string as a data type, similarly, variable storing number has int, float or complex as data type depending on the complexity of the number. Let’s understand fewContinue reading “Data Types”
Comments in Python
Comments are statements that is written inside a code which is used mostly for adding the note about the code. Comments doesn’t gets executed. It is basically ignored by the compiler. Comments are added to increase the code readability and maintainability. There are specific syntax that needs to be followed to write comments. Single lineContinue reading “Comments in Python”