Cheatsheet: Data Structures
    Array / List
    Map / Dict
    Set
    Tuple
    Struct / Data Class
    Stacks
    Other Data Structures
    Collection Conversions
Cheatsheet: Control Flow
Cheatsheet: Class

Polyglot CheatSheet - Print

Updated: 2021-11-19

Print

Python

# with new line
print("1")

# without new line
print("1", end='')

pprint can pretty-print arbitrary Python data structures

>>> import pprint

>>> pp = pprint.PrettyPrinter(indent=4)
>>> pp.pprint(foo)

Java

// with new line
System.out.println()

// without new line
System.out.print()

Java

System.out.println(Arrays.toString(arr));