[Tex/LaTex] Left margin for ‘custom’ item of enumeration

#enumeratelists

I'm recently started making my homework in LaTeX. I'm using the following style.

\begin{enumerate}[leftmargin=0.5cm]
  \begin{enumerate}
    \item Question
    \item[answer (a)] Answer
  \end{enumerate}
\end{enumerate}

But what happens is that answer "(a)" is aligned all the way to the left, not directly underneath the "(a)" of the question. How can I align it alright? I'm already using the enumitem package.

Best Answer

Is this what you want?

\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label={\textbf{(\alph*)}},leftmargin=0.5cm,align=left]
    \item Question
    \item[answer (a)] Answer
    \item Question
    \item[answer (b)] Answer
\end{enumerate}
\end{document}

enter image description here

Related Question