\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{Guillermo (guilleaf)} \pdfinfo{ /Title (python-basics.pdf) /Creator (Cheatography) /Author (Guillermo (guilleaf)) /Subject (Python (Basics) 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}{003366} \definecolor{LightBackground}{HTML}{F7F8FA} \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{Python (Basics) Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Guillermo (guilleaf)} via \textcolor{DarkBackground}{\uline{cheatography.com/19177/cs/2233/}}} \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}Guillermo (guilleaf) \\ \uline{cheatography.com/guilleaf} \\ \uline{\seqsplit{bit}.ly/guilleaf} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 11th 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}{p{0.68655 cm} x{1.3731 cm} x{2.51735 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Built-In data types}} \tn % Row 0 \SetRowColor{LightBackground} None & NoneType & None object \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} bool & Boolean & True, False \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} int & Integer & -2, -1, 0, 1, 2 \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} long & Long Integer & 123456789012345L \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} float & Floating point & 3.1415 \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{complex} & complex & 3 + 4*1j \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} str & String & 'alice', 'bob' \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{unicode} & Unicode String & u'alice', u'bob' \tn % Row Count 11 (+ 2) % Row 8 \SetRowColor{LightBackground} list & List & {[}1, 'two', 3.0{]} \tn % Row Count 12 (+ 1) % Row 9 \SetRowColor{white} tuple & Tuple & (1, 'two', 3.0) \tn % Row Count 13 (+ 1) % Row 10 \SetRowColor{LightBackground} dict & Dictionary & \{'name': alice, 'age': 7\} \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Indentation matters}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{if Cheshire.is\_visible: \newline print('I can see you') \newline alice.talks() \newline else: \newline print("I can't see you")} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Four spaces is the recommended by PEP 8 (Style Guide for Python Code)} \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 Literals}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{'alice' \newline "bob" \newline "The Hatter's Tea" \newline """Twinkle, twinkle, little bat! \newline How I wonder what you're at!"""} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.39356 cm} x{3.58344 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{String Methods}} \tn % Row 0 \SetRowColor{LightBackground} s.lower() & Lowercased copy \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} s.upper() & Uppercased copy \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{s.isalpha()} & True if alphabetic \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{s.isalnum()} & True if alphanumeric \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} s.split(t) & Split s using t as separator \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} s.zfill(w) & Padding with leading zeros \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} s.strip() & Removes beg/end spaces \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.28942 cm} x{2.68758 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Lists}} \tn % Row 0 \SetRowColor{LightBackground} lst.append(x) & Append x to the end of lst \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} lst.count(x) & How many times x is in lst \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} lst.extend(itr) Same as lst += itr & Append all of iterable itr to lst \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} lst.index(x) & Index position of the first occurrence \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} lst.insert(i,x) & Insert item x into lst at index i \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} lst.pop() & Removes the last item in lst \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} lst.pop(i) & Removes item with index i \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} lst.remove(x) & Removes the first occurrence of x in lst \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} lst.reverse() & Reverse the list lst in-place \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} lst.sort() & Sorts lst in-place \tn % Row Count 19 (+ 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}{List Comprehensions}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\textgreater{}\textgreater{}\textgreater{} {[}2{\bf{x for x in range(10){]} \newline {[}1, 2, 4, 8, 16, 32, 64, 128, 256, 512{]} \newline \newline \textgreater{}\textgreater{}\textgreater{} {[}2}}x for x in range(10) if x\%2 == 0{]} \newline {[}1, 4, 16, 64, 256{]}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.04517 cm} x{3.93183 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Dictionaries}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{d.clear()} & All items from dict d \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{d.copy()} & Shallow copy of dict d \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{d.keys()} & Read-only iterable of all keys \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{d.values()} & Read-only iterable of all values \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{d.items()} & Read-only iterable of all (key, value) \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{d.pop(k)} & Removes (k, value) and returns d{[}k{]} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Conditionals}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{if x \textgreater{} 0 and y \textgreater{} 0: \newline print('First Quadrant') \newline elif x \textless{} 0 and y \textgreater{} 0: \newline print('Second Quadrant') \newline elif y \textless{} 0: \newline print('Third and Fourth') \newline else: \newline print('On the axis')} \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}{Loops (for)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{a=1 \newline b=2 \newline for i in range(10): \newline c=a+b \newline print c \newline a=b; b=c} \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}{Loops (while)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{import random \newline x=1.0 \newline while True: \newline x{\emph{=random.random() \newline print x \newline if x\textless{}0.5: \newline x}}=3 \newline continue \newline if x\textgreater{}0.8: \newline break} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{You can use 'break' to escape from the inner loop and 'continue' to jump to the next item in the loop} \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}{Classes}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{class Quaternion(object): \newline \newline def \_\_init\_\_(self, four\_tuple): \newline self.values=four\_tuple \newline \newline @property \newline def real(self): \newline return self.values{[}0{]}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Special Methods}} \tn % Row 0 \SetRowColor{LightBackground} \_\_bool\_\_(self) & True of False return \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \_\_init\_\_(self, args) & Object Initialization \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \_\_hash\_\_(self) & To be use as key \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \_\_repr\_\_(self) & String eval(repr(x))==x \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \_\_str\_\_(self) & Human readable string \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{4.4793 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Comparison Special Methods}} \tn % Row 0 \SetRowColor{LightBackground} \_\_lt\_\_(self, other) & \textless{} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \_\_le\_\_(self, other) & \textless{}= \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \_\_gt\_\_(self, other) & \textgreater{} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \_\_ge\_\_(self, other) & \textgreater{}= \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \_\_eq\_\_(self, other) & == \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \_\_ne\_\_(self, other) & != \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.79172 cm} x{3.18528 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{os Module}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{os.listdir(path)} & Equivalent to 'ls' \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} os.getcwd() & Current Working Directory (pwd) \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{os.mkdir(path)} & Make directory (mkdir) \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{os.chdir(path)} & Change directory (cd) \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{os.path.isfile(path)} & Check if path is a file \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{os.path.isdir(path)} & Check if path is directory \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{os.path.exists(path)} & Check existence as file or directory \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{sys Module}} \tn % Row 0 \SetRowColor{LightBackground} sys.argv & List of arguments \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} sys.version & Python version \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} sys.platform & OS platform \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} sys.maxint & Max integer \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} sys.stdout & Standard output \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} sys.stderr & Standard error \tn % Row Count 6 (+ 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}{itertools Module}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{product('ABCD', repeat=2)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{permutations('ABCD', 2)} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{AB AC AD BA BC BD CA CB CD DA DB DC} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{combinations('ABCD', 2)} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{AB AC AD BC BD CD} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{combinations\_with\_replacement('ABCD'}, 2)} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{AA AB AC AD BB BC BD CC CD DD} \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{math Module}} \tn % Row 0 \SetRowColor{LightBackground} sin, cos, tan & Trigonometrical \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} asin, acos, atan & Inv. Trigonometrical \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} sinh, cosh, tanh & Hyperbolic \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} asinh, acosh, atanh & Inverse Hyperbolic \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} ceil, floor, trunc & Truncation \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} log, log10 & Logarithms \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} sqrt, exp, pow & Exponentials \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} degrees, radians & Angular conversion \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} pi, e & Math Constants \tn % Row Count 9 (+ 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}{json Module}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\textgreater{}\textgreater{}\textgreater{} import json \newline \textgreater{}\textgreater{}\textgreater{} dic=\{'name':'Alice', 'age': 7.5\} \newline \textgreater{}\textgreater{}\textgreater{} dic\_json=json.dumps(dic, \newline sort\_keys=True, \newline indent=4, \newline separators=(',', ': ')) \newline \textgreater{}\textgreater{}\textgreater{} print dic\_json \newline \{ \newline "age": 7.5, \newline "name": "Alice" \newline \} \newline \textgreater{}\textgreater{}\textgreater{} dic2=json.loads(dic) \newline \textgreater{}\textgreater{}\textgreater{} dic2 \newline \{u'age': 7.5, u'name': u'Alice'\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}