Random playlists program
Pretty good for a self-taught beginner, keep going like this and you're golden!

Recursion and infinite loop

This is probably the worst part of the script:


def remove_selection():
    while True:
        try:
            to_remove = int(input('To remove a selection enter the number of the selection you want removed here. &gt;&gt;&gt; '))
            if to_remove &lt;= len(playlist_):
                break
        except ValueError:
            print('Enter a number.')
            remove_selection()
        try:
            playlist_.pop((to_remove - 1))
            break
        except (IndexError, UnboundLocalError):
            print('Enter a vaild number')
            remove_selection()



An infinite loop, a misused exception handling,
an incorrect error handling, and recursive calls...
This is confusing and more complicated than it needs to be.

You can replace the recursive calls with continue.

Exception handling for converting the input to integer is appropriate, because there is no better way. It is not appropriate for validating the input is within range, because a better way exists using conditionals.

Also, it's not enough to check that the index is less than the length of the list, you also need to check that it's 0 or greater.

UnboundLocalError is thrown when trying to access a variable that hasn't been assigned. That's not an exception to catch, it indicates a problem in the logic that needs to be fixed.

Here's one way to address these issues:

while True:
    try:
        to_remove = int(input('To remove a selection enter the number of the selection you want removed here. &gt;&gt;&gt; '))
    except ValueError:
        print('Enter a number.')
        continue
    if not (0 &lt; to_remove &lt;= len(playlist_)):
        print('Enter a valid number (within range: 1..{})'.format(len(playlist_)))
        continue
    playlist_.pop(to_remove - 1)
    break


Global variables

Try to avoid global variables as much as possible.

For example, instead of this:


def number_of_selections():
    while True:
        try:
            global number
            number = int(input('How many files would you like to add to playlist? &gt;&gt;&gt; '))
            break
        except ValueError:
            print('Enter a number.')



It would be better to make the function return the number:

def number_of_selections():
    while True:
        try:
            return int(input('How many files would you like to add to playlist? &gt;&gt;&gt; '))
        except ValueError:
            print('Enter a number.')


And then adjust the callers appropriately to pass the number as parameter where needed, for example instead of:


number_of_selections()
get_selections()



Write:

get_selections(number_of_selections())


Adjust the rest of the code accordingly, and try to eliminate the other global variables too, all_media and playlist_.
For these two, another good alternative will be to create a class, where these variables will be member fields.

Simplifications

Instead of this:


if ok == 'yes' or ok == 'y':



A bit simpler way to write:

if ok in ('yes', 'y'):


Optimizing imports, and coding style

The script is not actually using sys, so you can drop that import.

And the style guide recommends to import one package per line, like this:

import os
import random


Do read the style guide, it has many other recommendations that apply to your script.