\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{sschaub} \pdfinfo{ /Title (essential-python.pdf) /Creator (Cheatography) /Author (sschaub) /Subject (Essential Python Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{3672FF} \definecolor{LightBackground}{HTML}{F2F6FF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Essential Python Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{sschaub} via \textcolor{DarkBackground}{\uline{cheatography.com/1000/cs/374/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}sschaub \\ \uline{cheatography.com/sschaub} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 21st May, 2012.\\ Updated 13th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Data Types}} \tn % Row 0 \SetRowColor{LightBackground} Integer & -256, 15 \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Float & -253.23, 1.253e-10 \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} String & "Hello", 'Goodbye', """Multiline""" \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} Boolean & True, False \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} List & {[} {\emph{value}}, ... {]} \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} Tuple & ( {\emph{value}}, ... )\textasciicircum{}1\textasciicircum{} \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{Dictionary} & \{ {\emph{key}}: {\emph{value}}, ... \} \tn % Row Count 9 (+ 2) % Row 7 \SetRowColor{white} Set & \{ {\emph{value}}, {\emph{value}}, ... \}\textasciicircum{}2\textasciicircum{} \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\textasciicircum{}1\textasciicircum{} Parentheses usually optional \newline \textasciicircum{}2\textasciicircum{} Create an empty set with set()} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Statements}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{If Statement}} \newline % Row Count 1 (+ 1) if {\emph{expression}}: \newline % Row Count 2 (+ 1) ~~statements \newline % Row Count 3 (+ 1) elif {\emph{expression}}: \newline % Row Count 4 (+ 1) ~~statements \newline % Row Count 5 (+ 1) else: \newline % Row Count 6 (+ 1) ~~statements \newline % Row Count 7 (+ 1) {\bf{While Loop}} \newline % Row Count 8 (+ 1) while {\emph{expression}}: \newline % Row Count 9 (+ 1) ~~statements \newline % Row Count 10 (+ 1) {\bf{For Loop}} \newline % Row Count 11 (+ 1) for {\emph{var}} in {\emph{collection}}: \newline % Row Count 12 (+ 1) ~~statements \newline % Row Count 13 (+ 1) {\bf{Counting For Loop}} \newline % Row Count 14 (+ 1) for i in range({\emph{start}}, {\emph{end}} {[}, {\emph{step}}{]}): \newline % Row Count 15 (+ 1) ~~statements \newline % Row Count 16 (+ 1) ({\emph{start}} is included; {\emph{end}} is not)% Row Count 17 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.75186 cm} x{1.16956 cm} x{1.04425 cm} x{1.21133 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Arithmetic Operators}} \tn % Row 0 \SetRowColor{LightBackground} x + y & add & x - y & subtract \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} x * y & multiply & x / y & divide \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} x \% y & modulus & x ** y & x\textasciicircum{}y\textasciicircum{} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}----} \SetRowColor{LightBackground} \mymulticolumn{4}{x{5.377cm}}{Assignment shortcuts: x {\emph{op}}= y \newline Example: x += 1 increments x} \tn \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.79363 cm} x{0.91894 cm} p{0.79363 cm} x{1.6708 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{Comparison Operators}} \tn % Row 0 \SetRowColor{LightBackground} x\textless{} y & Less & x \textless{}= y & Less or eq \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} x \textgreater{} y & Greater & x \textgreater{}= y & Greater or eq \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} x == y & Equal & x != y & Not equal \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{1.28156 cm} x{1.78503 cm} p{1.51041 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Boolean Operators}} \tn % Row 0 \SetRowColor{LightBackground} not x & x and y & x or y \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Exception Handling}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{try: \newline % Row Count 1 (+ 1) ~~statements \newline % Row Count 2 (+ 1) except {[} {\emph{exception type}} {[} as {\emph{var}} {]} {]}: \newline % Row Count 3 (+ 1) ~~statements \newline % Row Count 4 (+ 1) finally: \newline % Row Count 5 (+ 1) ~~statements% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Conversion Functions}} \tn % Row 0 \SetRowColor{LightBackground} int({\emph{expr}}) & Converts {\emph{expr}} to integer \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} float({\emph{expr}}) & Converts {\emph{expr}} to float \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} str({\emph{expr}}) & Converts {\emph{expr}} to string \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} chr({\emph{num}}) & ASCII char {\emph{num}} \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{String / List / Tuple Operations}} \tn % Row 0 \SetRowColor{LightBackground} len({\emph{s}}) & length of {\emph{s}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\emph{s}}{[}{\emph{i}}{]} & {\emph{i}}th item in {\emph{s}} (0-based) \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{s}}{[}{\emph{start}} : {\emph{end}}{]} & slice of {\emph{s}} from {\emph{start}} (included) to {\emph{end}} (excluded) \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} {\emph{x}} in {\emph{s}} & {\bf{True}} if {\emph{x}} is contained in {\emph{s}} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\emph{x}} not in {\emph{s}} & {\bf{True}} if {\emph{x}} is not contained in {\emph{s}} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} {\emph{s}} + {\emph{t}} & the concatenation of {\emph{s}} with {\emph{t}} \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} {\emph{s}} * {\emph{n}} & {\emph{n}} copies of {\emph{s}} concatenated \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} sorted({\emph{s}}) & a sorted copy of {\emph{s}} \tn % Row Count 15 (+ 1) % Row 8 \SetRowColor{LightBackground} {\emph{s}}.index({\emph{item}}) & position in {\emph{s}} of {\emph{item}} \tn % Row Count 17 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{More String Operations}} \tn % Row 0 \SetRowColor{LightBackground} {\emph{s}}.lower() & lowercase copy of {\emph{s}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\emph{s}}.replace({\emph{old}}, {\emph{new}}) & copy of {\emph{s}} with {\emph{old}} replaced with {\emph{new}} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{s}}.split( {\emph{delim}} ) & list of substrings delimited by {\emph{delim}} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} {\emph{s}}.strip() & copy of {\emph{s}} with whitespace trimmed \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} {\emph{s}}.upper() & uppercase copy of {\emph{s}} \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See also \seqsplit{http://docs.python.org/library/stdtypes.html\#string-methods}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Mutating List Operations}} \tn % Row 0 \SetRowColor{LightBackground} del {\emph{lst}}{[}{\emph{i}}{]} & Deletes {\emph{i}}th item from {\emph{lst}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\emph{lst}}.append({\emph{e}}) & Appends {\emph{e}} to {\emph{lst}} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{lst}}.insert({\emph{i}}, {\emph{e}}) & Inserts {\emph{e}} before {\emph{i}}th item in {\emph{lst}} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\emph{lst}}.sort() & Sorts {\emph{lst}} \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See also \seqsplit{http://docs.python.org/library/stdtypes.html\#typesseq-mutable}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Dictionary Operations}} \tn % Row 0 \SetRowColor{LightBackground} len({\emph{d}}) & Number of items in {\emph{d}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} del {\emph{d}}{[}{\emph{key}}{]} & Removes {\emph{key}} from {\emph{d}} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{key}} in {\emph{d}} & True if {\emph{d}} contains {\emph{key}} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} {\emph{d}}.keys() & Returns a list of keys in {\emph{d}} \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See also \seqsplit{http://docs.python.org/library/stdtypes.html\#mapping-types-dict}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Function Definitions}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{def {\emph{name}}({\emph{arg1}}, {\emph{arg2}}, ...): \newline % Row Count 1 (+ 1) ~~{\emph{statements}} \newline % Row Count 2 (+ 1) ~~return {\emph{expr}}% Row Count 3 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Environment}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{sys.argv} & List of command line arguments (argv{[}0{]} is executable) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{os.environ} & Dictionary of environment variables \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{os.curdir} & String with path of current directory \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{import sys; print(sys.argv)~~~~{\emph{or}} \newline from sys import argv; print(argv)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{String Formatting}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{"Hello, \{0\} \{1\}".format("abe", "jones") \newline % Row Count 1 (+ 1) {\emph{Hello, abe jones}} \newline % Row Count 2 (+ 1) "Hello, \{fn\} \{ln\}".format(fn="abe", ln="jones") \newline % Row Count 3 (+ 1) {\emph{Hello, abe jones}} \newline % Row Count 4 (+ 1) "You owe me \$\{0:,.2f\}".format(253422.3) \newline % Row Count 5 (+ 1) {\emph{You owe me \$253,422.30}} \newline % Row Count 6 (+ 1) now = datetime.now() \newline % Row Count 7 (+ 1) '\{:\%Y-\%m-\%d \%H:\%M:\%S\}'.format(now) \newline % Row Count 8 (+ 1) {\emph{2012-05-16 15:04:33}}% Row Count 9 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{See also \seqsplit{http://docs.python.org/library/string.html\#format-specification-mini-language}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Useful Functions}} \tn % Row 0 \SetRowColor{LightBackground} exit( {\emph{code}} ) & Terminate program with exit {\emph{code}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} raw\_input("{\emph{prompt}}") & Print {\emph{prompt}} and readline() from stdin\textasciicircum{}1\textasciicircum{} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\textasciicircum{}1\textasciicircum{} Use input("{\emph{prompt}}") in Python 3} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Code Snippets}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Loop Over Sequence}} \newline % Row Count 1 (+ 1) for index, value in enumerate(seq): \newline % Row Count 2 (+ 1) ~~print("\{\} : \{\}".format(index, value)) \newline % Row Count 3 (+ 1) {\bf{Loop Over Dictionary}} \newline % Row Count 4 (+ 1) for key in sorted(dict): \newline % Row Count 5 (+ 1) ~~print(dict{[}key{]}) \newline % Row Count 6 (+ 1) {\bf{Read a File}} \newline % Row Count 7 (+ 1) with open("filename", "r") as f: \newline % Row Count 8 (+ 1) ~~for line in f: \newline % Row Count 9 (+ 1) ~~~~line = line.rstrip("\textbackslash{}n") \# Strip newline \newline % Row Count 11 (+ 2) ~~~~print(line)% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Other References}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{http://rgruet.free.fr/ \newline % Row Count 1 (+ 1) {\emph{Great Python 2.x Quick Reference}} \newline % Row Count 2 (+ 1) \seqsplit{http://www.cheatography.com/davechild/cheat-sheets/python/} \newline % Row Count 4 (+ 2) {\emph{More Python Cheatsheet Goodness}}% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}