Created
October 11, 2020 22:35
-
-
Save woodman420/1e1b9f36ee4f04d2451dcf3313ad5ac4 to your computer and use it in GitHub Desktop.
This is a list generator created in python as a project to test my current knowledge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i1 = input("First list object: ") | |
| i2 = input("Second list object: ") | |
| i3 = input("Third list object: ") | |
| i4 = input("Fourth list object: ") | |
| i5 = input("Fifth list object: ") | |
| is_list = True | |
| # this is just for error demonstration | |
| # typing error in the first input will cause the list to go invalid | |
| if i1 == "error": | |
| is_list = False | |
| print("Invalid List") | |
| exit(0) | |
| list1 = [i1, i2, i3, i4, i5] | |
| if not is_list: | |
| print("Invalid list") | |
| else: | |
| print("List generation complete") | |
| if list1: | |
| print(list1) | |
| else: | |
| print("List generation failed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment