Question: # Assume food _ name is obtained from user input food _ name = input ( Enter the food name: ) # Right

# Assume food_name is obtained from user input
food_name = input("Enter the food name: ")
# Right-aligned with '=' as the fill character
right_aligned = food_name.rjust(20,'=')
print("Right-aligned:", right_aligned)
# Left-aligned with '=' as the fill character
left_aligned = food_name.ljust(20,'=')
print("Left-aligned:", left_aligned)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!