what is the meaning'DIRS': [os.path.join(BASE_DIR,'template')], code example

Example 1: 'DIRS': [os.path.join(BASE_DIR,'template')],

BASE_DIR /"challenges"/"templates" 

#challenges is the app name, it will automatically look for the app name and
#inside file named template

Example 2: 'DIRS': [os.path.join(BASE_DIR, 'templates')],

Incorrect syntax in polls app tutorial by Django

Use this: 
os.path.join(BASE_DIR, 'templates')

instead of this:
BASE_DIR / 'templates'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                # codes...
            ],
        },
    },
]