Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Sort
Popular
Most liked
Most recent
Time
Today
Last week
Last month
Last year
All time
Select Languages
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
ColdFusion
Command
CSS
Delphi
Django
Grunt
Gulp
HAML
HTML
iOS
Jade
Java
JavaScript
jQuery
Less
MySQL
Objective
Other
Pascal
Perl
PHP
PowerShell
Processing
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
Smarty
SQL
Swift
VHDL
XHTML
XML
Xojo
XSLT
SCSS
CoffeeScript
GLSL
Progress
Stylus
ES6
Coffee
TypeScript
X++
Haskell
SmallBASIC
JSX
SVG
Plain text
LUA
MDX
Apply
Reset
popular • Python
Test
Python
0
0
1756
Truncate HTML to a certain number of words
Python
0
0
1943
Collatz numbers
Python
0
0
2219
Sieve of Eratosthenes
Python
3
0
2150
Collatz 2
Python
0
0
2022
Better Sieve
Python
0
1
2665
Sudoku Checker
Python
5
1
7986
Spiral Matrix
Python
0
0
2327
Tkinter Framework
Python
0
0
2223
hi
Python
0
0
1667
finding a char in a string
Python
0
0
2439
readability.py
Python
0
1
2602
Test python code
Python
1
1
1624
python function decorator
Python
0
1
1354
hello
Python
1
1
1253
Fibonacci sequence
Python
0
8
1221
Oscar Riveros
Python
1
0
1160
Set / Get a tag from a configuration file
Python
0
0
1286
Random Youtube Link Generator
Python
1
3
2067
tarot.py
Python
0
1
1370