from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
# Define a Pipeline
pipe = Pipeline([('scaler', StandardScaler()), ('regressor', LinearRegression())])
# Access the first step in the Pipeline
first_step = pipe[:1]
# Access the second step in the Pipeline
second_step = pipe[1:2]
#Printing the result
print(first_step)
print(second_step)