Skip to main content

Featured post

8 Top AWS services before you learn read today

AWS provides various services. This post gives clear understanding on AWS top services. Not only for traditional services, it also offer services for Mobile  IoS and Android Os.


Aws Service catalog helps organizations to manage their IT services.
List of Top AWS  ServicesEC2LambdaS3DynamoDBIAMAmazon CognitioDevice FarmMobile analyticsSNS AWS EC2 Instance EC2: Amazon Elastic Compute Cloud (EC2) provides secure, scalable, on-demand hardware virtualization in the cloud.
Using Amazon EC2 eliminates the need to invest in server hardware up front so that users can focus on, develop, and deploy applications faster. 
EC2 instances come in various hardware configurations and include an operating system.

Lambda Function in AWS AWS Lambda lets users run snippets of code without provisioning an infrastructure. 
This service is billed on a pay-as-you-go model, with users only paying for the execution time of their lambda code. 
There is no charge when code is not running. Lambda code can be set up to…

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

Most Viewed

Hyperledger Fabric Real Interview Questions Read Today

I am practicing Hyperledger. This is one of the top listed blockchains. This architecture follows R3 Corda specifications. Sharing the interview questions with you that I have prepared for my interview.

Though Ethereum leads in the real-time applications. The latest Hyperledger version is now ready for production applications. It has now become stable for production applications.
The Hyperledger now backed by IBM. But, it is still an open source. These interview questions help you to read quickly. The below set of interview questions help you like a tutorial on Hyperledger fabric. Hyperledger Fabric Interview Questions1). What are Nodes?
In Hyperledger the communication entities are called Nodes.

2). What are the three different types of Nodes?
- Client Node
- Peer Node
- Order Node
The Client node initiates transactions. The peer node commits the transaction. The order node guarantees the delivery.

3). What is Channel?
A channel in Hyperledger is the subnet of the main blockchain. You c…