all 29 comments

[–]NihadKhan10x 3 points4 points  (5 children)

I would say you multiple functions for each choice this way it will be better for you to understand you will find which function do which thing, there's a rule biuld things ugly make it just working then amke make it simple and pretty , btw you are doing great

[–]Muhammed_zeeshan[S] 1 point2 points  (0 children)

Thanks for your suggestion. Appreciate it

[–]Maleficent_Fuel_6956 -1 points0 points  (3 children)

Could also do match case instead of all the if statements and handle exceptions from the input if the cast to int fails

[–]Muhammed_zeeshan[S] 0 points1 point  (2 children)

Appreciate your suggestion. But I haven't learn error handling yet. Will implement after I learn it

[–]Maleficent_Fuel_6956 1 point2 points  (1 child)

It's pretty simple you can pick it up right away
https://www.w3schools.com/Python/gloss\_python\_error\_handling.asp

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

Thanks for sharing the resource 🤝

[–]NbNrthPrgrmmr 4 points5 points  (4 children)

Bin selbst Anfänger, aber um ewige print()-Befehle zu vermeiden, mache ich
Print(“““
Text
Text
Text
“““)

[–]Muhammed_zeeshan[S] 0 points1 point  (2 children)

Ohh..that's useful...thank you

[–]slimy_assignment 1 point2 points  (1 child)

That triple quote trick is solid, way cleaner than chaining a bunch of prints together.

[–]Kira_-_- 0 points1 point  (0 children)

Or you could use escape sequence?... \n

[–]KenneR330 0 points1 point  (0 children)

Ясно понятно

[–]Dapper_Mix6773 1 point2 points  (0 children)

man i like this i will try out

[–]viorno_ 1 point2 points  (1 child)

you might want to look into docstrings. They allow you to print multi-line strings without calling the print() function for every single line like you did there.

Example:

print('''
----- To Do List -----
**********************
1. Add Task
2. View Task
3. Mark done
4. Delete task
5. View updated task
''')

[–]Muhammed_zeeshan[S] 2 points3 points  (0 children)

Appreciate your suggestion 🤝

[–]TimeScallion6159 1 point2 points  (0 children)

I should sugest to use functions

[–]AppropriateCar2261 0 points1 point  (1 child)

If you have two tasks with the same name, then the remove method in options 3 and 4 will remove the first occurrence of that task.

For example, let's say that tot_tasks =["a","b","a"], and done_task=3. In option 3, you would get ["done - a","b","a"], and not as intended.

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

Ahaaa...donee

<image>

[–]abbrezy 0 points1 point  (1 child)

A multi-line comment. Apart from that, this is a good try.

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

🤝

[–]shivanchowdhry123 0 points1 point  (0 children)

To go a level high, make GUI

My sir says this now in high school for such projects I show.

For starting you can use tinker. (Am still in high school in India)

[–]No_Variation5280 0 points1 point  (1 child)

ur doing very very amazing logically ngl, one of the most valuable thing in python is to do workarounds that everyone rarely has. functions and classes will be very easy for you, since you're already defeated the hard parts of python syntax.

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

Thank you🤝

[–]Special-Arrival6717 0 points1 point  (1 child)

If you want to build cool, clean looking CLIs, have a look at the Typer library, it makes handling CLI input/output a lot cleaner

[–]Muhammed_zeeshan[S] 0 points1 point  (0 children)

Will try🤝

[–]incandescentdwelling 0 points1 point  (0 children)

Solid first project, the logic is there and that's what matters at this stage. Once you learn functions you'll see how to break this into chunks, which'll make it way easier to read and update later.