Collecting todos in a list.

This commit is contained in:
Kira 2023-09-20 15:30:44 -07:00
parent d59c8dadd9
commit b28c8013a7
1 changed files with 14 additions and 7 deletions

21
main.py
View File

@ -1,16 +1,23 @@
# This is a sample Python script. # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code. # Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
#def print_hi(name):
def print_hi(name):
# Use a breakpoint in the code line below to debug your script. # Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. # print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script. # Press the green button in the gutter to run the script.
if __name__ == '__main__': #if __name__ == '__main__':
print_hi('PyCharm') # print_hi('PyCharm')
# See PyCharm help at https://www.jetbrains.com/help/pycharm/ # See PyCharm help at https://www.jetbrains.com/help/pycharm/
# -----------------------------------------------------------------
todos = []
todo_prompt = "Enter a todo: "
todo_length = len(todos)
while True:
todo = input(todo_prompt)
todos.append(todo)
print(todos)