You can use list slicing to slice Strings/Lists. Check it out. You don't need \n in the print statement as it adds a newline. To make a pyramid using your logic, you can delete two * from the string and then print. Remember, it's always better to use intuitive names for the variables. Eg: you can use, idx for index instead of placeholder2.
# Program to print an upside down pyramid
space = ""
astr3 = "**********"
num_stars = len(astr3) # len(astr3) gives number of * in the astr3 string
placeholder2 = 1
while placeholder2 < num_stars // 2:
display_str = space + astr3 # Adding strings is called concatnation.
print(display_str) # This will not add additional space between spaces and astr3
space += " "
astr3 = astr3[:-1] # deleting the last element from the list. Called list slicing
astr3 = astr3[1:] # deleting the first element from the list. Called list slicing
placeholder2 += 1
The above code outputs the following:
**********
********
******
****
**
TIP: It's better to share the expected output in the question so that the community can help.
astr3 = astr3[1:]*value will reduce by 1 per line and space value will increase by 1 per line?