Manage list of subjects (show, delete, add) in Python This is my code. It loops a menu, from which you can select whether you want to add a subject, see all subjects or delete a subject. Is there anything style- or functionality-wise to add or correct?
def add_subject(subjects):
    
    # ask for subject to add
    add = input(&quot;\nWhat subject do you want to add? &quot;)

    # if subject not already in list, add subject
    subjects.append(add) if not add in subjects else print(&quot;\nSubject already in list.&quot;)

def show_subjects(subjects):
    
    # show all subjects
    print(&quot;\nThese are your subjects: &quot;, subjects)

def delete_subject(subjects):
    
    # ask for subject to delete
    delete = input(&quot;\nPlease enter subject to delete: &quot;)

    # if subject is in list, delete subject
    subjects.remove(delete) if delete in subjects else print(&quot;\nSubject not found.&quot;)

def main():
    
    # initialise list of sample subjects
    subjects = [&quot;Math&quot;,&quot;Science&quot;,&quot;English&quot;]

    # loop action cycle
    while 1:
        try:
            # ask user for selection
            selection = int(input(&quot;\nPlease enter option: \n(1) Add subject\n(2) Show all subjects\n(3) Delete a subject\n(4) Quit\n&quot;))

            # call associated function
            if selection == 1:
                add_subject(subjects)
            elif selection == 2:
                show_subjects(subjects)
            elif selection == 3:
                delete_subject(subjects)
            elif selection == 4:
                break
            else:
                raise ValueError

        except ValueError:
            print(&quot;\nNot a viable option. Please pick 1, 2 or 3.&quot;)



if __name__ == &quot;__main__&quot;:
    main()
Clear the screen
Here is the terminal after three iterations

We can clean a lot of this up by simply doing
print(chr(27) + &quot;[2J&quot;)

after every iteration.
def clear_scr():
    print(chr(27) + &quot;[2J&quot;)

Note that on adding this, you should also do
input(&quot;Press any key to continue...&quot;) 

After the user selects an option, this way the user can wait and see what is on the screen peacefully without the program interrupting
def wait():
    input(&quot;Press any key to continue...&quot;)
    print(chr(27) + &quot;[2J&quot;)

Or a better version that also prints a confirmation message
def wait(message):
    input(f&quot;{message}. Press any key to continue...&quot;)
    print(chr(27) + &quot;[2J&quot;)



wait(&quot;Subject Added!&quot;)

&gt;&gt;&gt; Subject Added! Press any key to coninue... 


Unnecessary comments
# ask user for selection
selection = int(input(&quot;\nPlease enter option: \n(1) Add subject\n(2) Show all subjects\n(3) Delete a subject\n(4) Quit\n&quot;))

A comment here is totally not required, it only makes the code look convoluted for no reason. What I do suggest is the usage of docstrings.
def wait():
    &quot;&quot;&quot;
    Wait for the user to press any key then clear the screen
    &quot;&quot;&quot;
    ...


Print the subjects in a better fashion
I added a few more subjects in your program. When I entered Show all subjects.
These are your subjects:  ['Math', 'Science', 'French', 'Computer', 'Hindi', 'Social Science', 'Spanish', 'English']

This isn't nice at all, I suggest you print one on each line, with numbering, something like
Subjects

1. Math
2. Science
3. French
3. Computer
...

def show_subjects(subjects):
    &quot;&quot;&quot;
    print all the subjects line-by-line 
    &quot;&quot;&quot;
    print(&quot;\n\nSubjects\n&quot;)
    for i in range(len(subjects)):
        print(f&quot;{i+1}. {subjects[i]}&quot;)


Don't use magic numbers
            if selection == 1:
                add_subject(subjects)
            elif selection == 2:
                show_subjects(subjects)
            elif selection == 3:
                delete_subject(subjects)
            elif selection == 4:
                break
            else:
                raise ValueError

1, 2, 3, and 4 are unnamed numeric constants here. They don't really really tell anything about what the branch does. What if it was instead
            if selection == Choices.add.value:
                add_subject(subjects)
            elif selection == Choices.show.value:
                show_subjects(subjects)
            elif selection == Choices.delete.value:
                delete_subject(subjects)
            elif selection == Choices.quit.value:
                break
            else:
                raise ValueError

Without reading anything inside the if block, I can tell exactly what its going to do. That is an example of clean code.
You can achieve this by using an enum
from enum import Enum

class Choices(Enum):
    add = 1
    show = 2
    delete = 3
    quit = 4

print(Choices.add.value) 
&gt;&gt; 1

print(Choices.quit.value)
&gt;&gt; 4


Colored text
This one is optional, but it adds a lot of meaning to your code :). 
You can use the coloroma module to color your text to different colors in an easy way. For example, when you find that the user has entered bad input, you can do

Isn't that great! The best part about it is that it is cross-platform
from colorama import Fore, Back, Style
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')

You have a lot of options, it can help you customize the output a lot. Read the documentation
As suggested by @Reinderien, using the colorama library you can clear the screen too
import colorama as cr
cr.init()

print(cr.ansi.clear_screen()) # clears the screen

Re-written
from colorama import Fore, Back, Style
import colorama as cr
from enum import Enum

cr.init()


class Choices(Enum):
    add = 1
    show = 2
    remove = 3
    quit = 4


def wait(message = None):
    if message is None:
        input(&quot;Press any key to continue...&quot;)
    else:
        print(Fore.GREEN)
        print(Style.BRIGHT)

        print(message, end = '')

        print(Style.RESET_ALL)
        input(&quot;Press any key to continue...&quot;)

    print(cr.ansi.clear_screen())

def add_subject(subjects):
    add = input(&quot;\nWhat subject do you want to add? &quot;)
    if add not in subjects:
        subjects.append(add)
        wait(&quot;Subject Added!&quot;)
    else:
        print(&quot;Subject already present&quot;)
        wait()


def show_subjects(subjects):
    print(&quot;Subjects\n&quot;)
    print(Fore.YELLOW)
    print(Style.BRIGHT)
    for i in range(len(subjects)):
        print(f&quot;{i+1}. {subjects[i]}&quot;)
    wait()

def delete_subject(subjects):
    delete = input(&quot;\nPlease enter subject to delete: &quot;)
    if delete not in subjects:
        print(&quot;Subject not found&quot;)
        wait()
    else:
        subjects.remove(delete)
        wait(&quot;Subject removed!&quot;)

def main():
    subjects = [&quot;Math&quot;,&quot;Science&quot;,&quot;English&quot;]
    while True:
        try:
            selection = int(input(&quot;\nPlease enter option: \n(1) Add subject\n(2) Show all subjects\n(3) Delete a subject\n(4) Quit\n&quot;))
            if selection == Choices.add.value:
                add_subject(subjects)
            elif selection == Choices.show.value:
                show_subjects(subjects)
            elif selection == Choices.remove.value:
                delete_subject(subjects)
            elif selection == Choices.add.value:
                break
            else:
                raise ValueError

        except ValueError:
            print(Fore.RED)
            print(&quot;\nNot a viable option. Please pick 1, 2 or 3.&quot;)
            print(Style.RESET_ALL)
            wait()



if __name__ == &quot;__main__&quot;:
    main()