Template:Code and output

Example[edit]

Normal usage

{{code and output|code=
print("hello")
|output=
hello
}}
print("hello")
hello

Shrink to fit output

{{code and output|fit=output|code=
print(#"A really really really long string, which might linewrap, and use up too much space. Blah blah blah!")
|output=
100
}}
100
print(#"A really really really long string, which might linewrap, and use up too much space. Blah blah blah!")

Shrink to fit code

{{code and output|fit=code|code=
print(#"A really really really long string, which might linewrap, and use up too much space. Blah blah blah!")
|output=
100
}}
print(#"A really really really long string, which might linewrap, and use up too much space. Blah blah blah!")
100