Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list that may vary
- errors_list = ['It has no letters', 'It has symbols', 'The last letter is a space']
- for i in errors_list:
- print(" " + str(errors_list.index(i) + 1) + "- " + i + ".")
- 1- It has no letters.
- 2- It has symbols.
- 3- The last letter is a space.
- 1- It has no letters,
- 2- It has symbols,
- 3- The last letter is a space.
- for i in errors_list[0:-1]:
- print(" " + str(errors_list.index(i) + 1) + "- " + i + ",")
- print(" " + str(len(errors_list)) + "- " + errors_list[-1] + ".")
- for i, err in enumerate(errors_list):
- print(" {}- {}{}".format(i+1, err, ';' if i+1 != len(errors_list) else '.'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement