My current code is:
for i in range(len(phoneList)):
print("|{}|{}|{}|{}|".format(formattedPhoneList[i],namesList[i],number[i], lastDue[i]))
if float(lastDue[i]) > 850:
print("**")
elif float(lastDue[i]) < 850 and int(number[i]) > 350:
print("++")
else:
continue
Desired Output would be:
|Index[0] of formattedPhoneList|Name Index[0]|384|$ 976.97|**
|Index[1] of formattedPhoneList|Name Index[1]|132|$ 188.81|
|Index[2] of formattedPhoneList|Name Index[2]|363|$ 827.48|++
Current Output:
|Index[0] of formattedPhoneList|Name Index[0]|384|$ 976.97|
**
|Index[1] of formattedPhoneList|Name Index[1]|132|$ 188.81|
|Index[2] of formattedPhoneList|Name Index[2]|363|$ 827.48|
++
I have tried inserting a trailing comma and import stdout with no success. Is there another way to format this? Thank you for reading.