Featured post

Blockchain Smart Contract Theory Behind

The smart contract in Blockchain is a kind of software application that works without human intervention based on the transaction logs and provide a solution to the user request. 
I want to share the back end mechanism in the Smart Contract of Blockchain.

Smart Contract Mechanism What is Smart ContractA smart contract is a protocol which can auto-execute, facilitate, verify, or enforce the negotiation of a contract.Agreement between two parties you can say as a contract.Incorporating the rules of the physical contract into the computing world, you can say as a smart contractBlockchain supports you to create smart contracts.Smart Contracts are self-executing programs which run on the blockchain and are capable of enforcing rulesUsing Blockchain as a platform and making an agreement or contract between more than two parties, you can say as Smart Contract.Traditional Markets  4 Top Benefits of Smart ContractCurrently, smart contracts are being used only in Crypto CurrenciesNow Smart Contra…

Python for Loop Print rows using List concept

For loop is crucial for your python programming. Out of all the For Loop options, the list option is so popular. If you know, how to use this concept, you can write any number of programs quickly and with less effort.

Using for loop you can get index for list items. You can print list elements using for loop.

If you take any language, the loops play a vital role.
for loop using list in python

The use of For Loop

When you want to deal with data of multiple values, you need loops. So, For Loop is so famous because, you can control multiple input values.

Syntax For Loop

       
for i in my_list:
    print(i)
       
 

The 'i' says variable that represents value in the 'my_list'. The for helps to iterate the list values one by one.

Example Program For Loop List in Python

           my_list=[2,3,4]
           for i in my_list:
                print(i)       
 

Result

           2
           3
           4

How to create Multiplication Table using Python with For Loop and List option

Function to create table
Function to create table

Result of function that generated Multiplication Table 

 
how to create table in python
Creating multiplication table in python

Bottom Line

  1. You can use for loop to calculate Factorial and listing values one by one.
  2. Your input data contains multiple values, then For loop is so useful.

References

  1. SanFoundary for Python Sample Programs

Top Courses

Top Books
  1. Taming Python by Programming

Comments

Popular posts from this blog

Hyperledger Fabric: 20 Real Interview Questions

Hadoop fs (File System) Commands List

Python Dictionary Vs List Both Not The Same Why

How to use Blockchain on Cloud