Featured Post

8 Ways to Optimize AWS Glue Jobs in a Nutshell

Image
  Improving the performance of AWS Glue jobs involves several strategies that target different aspects of the ETL (Extract, Transform, Load) process. Here are some key practices. 1. Optimize Job Scripts Partitioning : Ensure your data is properly partitioned. Partitioning divides your data into manageable chunks, allowing parallel processing and reducing the amount of data scanned. Filtering : Apply pushdown predicates to filter data early in the ETL process, reducing the amount of data processed downstream. Compression : Use compressed file formats (e.g., Parquet, ORC) for your data sources and sinks. These formats not only reduce storage costs but also improve I/O performance. Optimize Transformations : Minimize the number of transformations and actions in your script. Combine transformations where possible and use DataFrame APIs which are optimized for performance. 2. Use Appropriate Data Formats Parquet and ORC : These columnar formats are efficient for storage and querying, signif

How to Use For loop List Option Quickly

For loop is main concept in 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

How to Use 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 to Write 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 For-Loop 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

How to Fix datetime Import Error in Python Quickly

How to Check Kafka Available Brokers

SQL Query: 3 Methods for Calculating Cumulative SUM